code: func NewLambdaTaskState(stateName string, lambdaFn *sparta.LambdaAWSInfo) *LambdaTaskState {
  	ts := &LambdaTaskState{
  		BaseTask: BaseTask{
  			baseInnerState: baseInnerState{
  				name: stateName,
  				id:   rand.Int63(),
  			},
  		},
  		lambdaFn: lambdaFn,
  	}
  	ts.LambdaDecorator = func(serviceName string,
  		lambdaResourceName string,
  		lambdaResource gocf.LambdaFunction,
  		resourceMetadata map[string]interface{},
  		S3Bucket string,
  		S3Key string,
  		buildID string,
  		cfTemplate *gocf.Template,
  		context map[string]interface{},
  		logger *logrus.Logger) error {
  		if ts.preexistingDecorator != nil {
  			preexistingLambdaDecoratorErr := ts.preexistingDecorator(
  				serviceName,
  				lambdaResourceName,
  				lambdaResource,
  				resourceMetadata,
  				S3Bucket,
  				S3Key,
  				buildID,
  				cfTemplate,
  				context,
  				logger)
  			if preexistingLambdaDecoratorErr != nil {
  				return preexistingLambdaDecoratorErr
  			}
  		}
  		// Save the lambda name s.t. we can create the {"Ref"::"lambdaName"} entry...
  		ts.lambdaLogicalResourceName = lambdaResourceName
  		return nil
  	}
  	// Make sure this Lambda decorator is included in the list of existing decorators
  
  	// If there already is a decorator, then save it...
  	ts.preexistingDecorator = lambdaFn.Decorator
  	ts.lambdaFn.Decorators = append(ts.lambdaFn.Decorators,
  		sparta.TemplateDecoratorHookFunc(ts.LambdaDecorator))
  	return ts
  }
docs: // NewLambdaTaskState returns a LambdaTaskState instance properly initialized