3

Is it possible to set a single Cloudwatch Alarm for an API Gateway so that it should listen out for 4xx AND 5xx errors?

My goal is that the alarm should have a threshold of say 10 errors in 5 minutes, and it should be triggered by either of these two errors.

So if there are five 4xx errors and five 5xx errors it should go into alarm.

  1. Is this possible?
  2. If yes, is this good practice or is it better to have 2 alarms, one for each, 4xx and 5xx?
  3. I'm using aws cdk for python, so as a bonus I'd appreciate if you can answer to that direction.

Thanks

Avramo
  • 143
  • 9

0 Answers0