Open
Description
Really enjoying cdk-watchful but I wanted to add my own custom alarm, here is how I did it:
watchful.watch_lambda_function("MyLambda", my_lambda)
lambda_invocations = my_lambda.metric_invocations(period=cdk.Duration.minutes(1))
invocation_alarm = cloudwatch.Alarm(
self,
"Invocations",
metric=lambda_invocations,
evaluation_periods=1,
threshold=20,
)
watchful.add_alarm(invocation_alarm)
Metadata
Metadata
Assignees
Labels
No labels