code: func awsSession(logger *logrus.Logger) *session.Session {
  	awsConfig := &aws.Config{
  		CredentialsChainVerboseErrors: aws.Bool(true),
  	}
  
  	// Log AWS calls if needed
  	switch logger.Level {
  	case logrus.DebugLevel:
  		awsConfig.LogLevel = aws.LogLevel(aws.LogDebugWithHTTPBody)
  	}
  	awsConfig.Logger = &logrusProxy{logger}
  	sess, sessionErr := session.NewSession(awsConfig)
  	if sessionErr != nil {
  		logger.WithField("Error", sessionErr).Warn("Failed to attach AWS Session logger")
  	} else {
  		sess.Handlers.Send.PushFront(func(r *request.Request) {
  			logger.WithFields(logrus.Fields{
  				"Service":   r.ClientInfo.ServiceName,
  				"Operation": r.Operation.Name,
  				"Method":    r.Operation.HTTPMethod,
  				"Path":      r.Operation.HTTPPath,
  				"Payload":   r.Params,
  			}).Debug("AWS Request")
  		})
  	}
  	return sess
  }
docs: // Returns an AWS Session (https://github.com/aws/aws-sdk-go/wiki/Getting-Started-Configuration)
  // object that attaches a debug level handler to all AWS requests from services
  // sharing the session value.