code: func NewAWSLambda(functionName string,
  	lambdaHandler interface{},
  	roleNameOrIAMRoleDefinition interface{}) (*LambdaAWSInfo, error) {
  
  	if functionName == "" {
  		return nil, errors.Errorf("AWS Lambda function name must not be empty")
  	}
  	if lambdaHandler == nil {
  		return nil, errors.Errorf("AWS Lambda function handler must not be nil")
  	}
  
  	lambda := &LambdaAWSInfo{
  		userSuppliedFunctionName: functionName,
  		handlerSymbol:            lambdaHandler,
  		Options:                  defaultLambdaFunctionOptions(),
  		Permissions:              make([]LambdaPermissionExporter, 0),
  		EventSourceMappings:      make([]*EventSourceMapping, 0),
  		deprecationNotices:       make([]string, 0),
  	}
  
  	switch v := roleNameOrIAMRoleDefinition.(type) {
  	case string:
  		lambda.RoleName = v
  	case IAMRoleDefinition:
  		definition := v
  		lambda.RoleDefinition = &definition
  	default:
  		return nil, errors.Errorf("AWS Lambda function IAM role must not be empty")
  	}
  	return lambda, nil
  }
docs: /*
  Supported lambdaHandler signatures:
  
  • func ()
  • func () error
  • func (TIn), error
  • func () (TOut, error)
  • func (context.Context) error
  • func (context.Context, TIn) error
  • func (context.Context) (TOut, error)
  • func (context.Context, TIn) (TOut, error)
  */
  // NewAWSLambda is the creation function that replaces HandleAWSLambda. It returns
  // a *LambdaAWSInfo pointer to the struct representing the AWS lambda target. It's a
  // go-friendly signature for creating a lambda function