Skip to content

(core): Rate limit errors deploying CloudWatch Log groups #807

@ddneilson

Description

@ddneilson

When the RFDK creates a CloudWatch Log group it does it via the CDK's LogRetention construct. The CloudWatch Logs APIs that the LogRetention construct calls have a very low TPS limit (5 TPS). The result is that when deploying multiple RFDK constructs one can encounter rate limit errors in the deployment -- this is particularly seen, randomly, with the RFDK's integration tests.

CDK's LogRetention construct provides a way to configure the Javascript SDK that it's using to make the CloudWatch API calls. Using this, the RFDK should set higher max retries and retry delay.

Specifically, the RFDK should set the logRetentionRetryOptions option in these two places:

  1. new LogRetention(scope, logWrapperId, {
  2. const logRetention = new LogRetention(this, 'LogRetention', {

Probably go for something really high for maxRetries (20?) and a delay base of 1s.

edit: The same option exists on Lambda Function constructs, and should be set there as well.


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions