Join Slack
Powered by
Does anyone know how to get Cloudwatch lambda func...
# help
a
Artemiy Davydov
03/22/2022, 7:15 PM
Does anyone know how to get Cloudwatch lambda function metrics through code?
f
Frank
03/23/2022, 2:33 AM
Hey
@Artemiy Davydov
you can get the metrics like this
Copy code
const fn = new sst.Function(...); fn.metricDuration(); fn.metricErrors();
see the doc here
https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-lambda.Function.html#metricmetricname-props
Frank
03/23/2022, 2:34 AM
And you can create alarms like this.
https://docs.aws.amazon.com/cdk/api/v1/docs/aws-lambda-readme.html#function-timeout
Frank
03/23/2022, 2:34 AM
Let me know if this is what you are looking for.
Open in Slack
Previous
Next