CloudWatch Alarms

The CloudWatchErrorAlarmDecorator associates a CloudWatch alarm and destination with your Lambda function.

Sample usage:

lambdaFn, _ := sparta.NewAWSLambda("Hello World",
  helloWorld,
  sparta.IAMRoleDefinition{})

lambdaFn.Decorators = []sparta.TemplateDecoratorHandler{
  spartaDecorators.CloudWatchErrorAlarmDecorator(1,
    1,
    1,
    gocf.String("MY_SNS_ARN")),
}