Skip to content

Instantly share code, notes, and snippets.

@elijahzarlin
Created July 3, 2019 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elijahzarlin/fd87cf770730a47f762cce3aee65dd7a to your computer and use it in GitHub Desktop.
Save elijahzarlin/fd87cf770730a47f762cce3aee65dd7a to your computer and use it in GitHub Desktop.
alarm-actions
LambdaErrorAlarm: {
Type: 'AWS::CloudWatch::Alarm',
Properties: {
AlarmActions: [cf.importValue(cf.sub('on-call-production-${AlarmTeam}'))],
AlarmDescription: 'The Lambda errored more than once in the past 5 minutes.',
AlarmName: cf.join('-', [cf.stackName, cf.region]),
Period: 60,
EvaluationPeriods: 5,
Statistic: 'Sum',
Threshold: 0,
ComparisonOperator: 'GreaterThanThreshold',
Namespace: 'AWS/Lambda',
Dimensions: [{ Name: 'FunctionName', Value: cf.ref('FunctionName') }],
MetricName: 'Errors'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment