function snsMiddleware(shim, config, next, context) {
  if (context.commandName === 'PublishCommand') {
    return shim.recordProduce(next, getSnsSpec)
  }
  shim.logger.debug(`Not instrumenting command ${context.commandName}.`)

  return next
}
Middleware hook that records the middleware chain
when command is `PublishCommand`

@param {Shim} shim
@param config
@param {function} next middleware function
@param {Object} context
@returns {function}