ozil
ozil

Reputation: 669

How to create cloudformation cloudwatch alarm for lambda/dynamo?

lambda calls dynamo , want to set up a alarm which can capture latency issues in lambda while calling dynamo, I have one sample i created below for errors in lambda, can i add latency to the following, if so how?

  MyAlarm:
    Type: AWS::CloudWatch::Alarm
    Properties:
      AlarmName: "superalarm"
      AlarmDescription: "Alarm if lambda errors out "
      Namespace: "AWS/Lambda"
      MetricName: "Errors"
      Dimensions:
      - Name: "FunctionName"
        Value: "mylambda"
      Statistic: "Sum"
      ComparisonOperator: "GreaterThanThreshold"
      Threshold: 0
      EvaluationPeriods: 5
      Period: 60
      TreatMissingData: "breaching"

Upvotes: 0

Views: 450

Answers (1)

Marcin
Marcin

Reputation: 238199

You need to create a second alarm, or use metric math to create a composite metric from the latency and Errors.

In CloudFormation you can use Expression to define the math expression that you want.

Upvotes: 1

Related Questions