aws-cloudformation / aws-cloudformation-resource-providers-logs

The CloudFormation Resource Provider Package For Amazon CloudWatch Logs
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
Apache License 2.0
33 stars 35 forks source link

Throw RetryableException to make CFN handler retry on Rate Exceeded Error #98

Closed gordonpn closed 1 year ago

gordonpn commented 1 year ago

Issue #, if available:

Description of changes:

AWS SDK returns error code 400 for most of their APIs and because of that, CFN was not retrying Rate Exceeded errors with 400 status code.

This PR adds error matching to match Rate exceeded exceptions and throws a RetryableException in order for CFN to know to retry the request.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.