Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudwatch alarm for 5xx API responses doesn't work #2044

Open
asjohnston-asf opened this issue Jan 27, 2024 · 2 comments
Open

Cloudwatch alarm for 5xx API responses doesn't work #2044

asjohnston-asf opened this issue Jan 27, 2024 · 2 comments

Comments

@asjohnston-asf
Copy link
Member

asjohnston-asf commented Jan 27, 2024

Our API alarm specifies ApiId, but the cloudwatch docs suggest the correct dimension is ApiName. The metric is 5xx, but should be 5XXError.

https://github.com/ASFHyP3/hyp3/blob/develop/apps/monitoring-cf.yml.j2#L34

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-metrics-and-dimensions.html

The alarm is created, but the metric always reports as No Data even when there are 5xx responses, so the alarm never triggers and no SNS message is ever sent.

@asjohnston-asf
Copy link
Member Author

This issue was introduced in v2.11.0 when the API Gateway was converted from a HTTP API to a REST API. The CloudWatch metric and dimension names differ between the two types of APIs:

@asjohnston-asf
Copy link
Member Author

Unfortunately, there is no straightforward way to retrieve the auto-generated API name for use by the CloudWatch Alarm. I've opened aws-cloudformation/cloudformation-coverage-roadmap#1918 requesting that feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant