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

Custom::LogRetention - ThrottlingException when creating multiple resources #24879

Closed
shantgup opened this issue Mar 30, 2023 · 2 comments
Closed
Assignees
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@shantgup
Copy link

Describe the bug

CDK,

Creating this on behalf of an enterprise customer that experienced significant pains & delays due to this issue.

The Custom::LogRetention resource backed by a Lambda function managed by CDK with the source code here, gets throttled by CloudWatch Logs when multiple resources are being created.

Recommend implementing backoff and retry mechanism on this custom resource to prevent failure due to throttling.

Expected Behavior

The Custom::LogRetention resource should backoff and retry when it encounters a ThrottlingException.

Current Behavior

Currently, the Custom::LogRetention resource fails when it encounters a ThrottlingException, and this causes the entire CloudFormation stack to fail and rollback.

Reproduction Steps

Deploy any CloudFormation stack with multiple log-retention-provider that in turn create Custom::LogRetention resources.

Possible Solution

Implement backoff and retry until successful.

Additional Information/Context

No response

CDK CLI Version

2.67.0

Framework Version

No response

Node.js Version

14.x

OS

Lambda

Language

Typescript

Language Version

No response

Other information

No response

@shantgup shantgup added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2023
@github-actions github-actions bot added the @aws-cdk/aws-logs Related to Amazon CloudWatch Logs label Mar 30, 2023
@khushail
Copy link
Contributor

khushail commented Mar 30, 2023

Hi @shantgup , thanks for reaching out. This LogRetentionRetryOptions might be helpful to go through for what you are looking for.

Could you also share the full error messages on the CDK deployment as well ?
We actually had LogRetentionRetryOptions that was previously designed to work around a OperationAbortedException error(see #17546). Behind the scene, log-retention-provider will just creates the log groups with SDK retry options and handle the ResourceAlreadyExistsException and OperationAbortedException. Not sure if we should include ThrottlingException here but having full error messages would be very helpful for us to address this issue.

Let me know if this does not help.

@khushail khushail self-assigned this Mar 30, 2023
@khushail khushail added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2023
@github-actions
Copy link

github-actions bot commented Apr 2, 2023

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Apr 2, 2023
@github-actions github-actions bot closed this as completed Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-logs Related to Amazon CloudWatch Logs bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants