Skip to content

(events-target): Rule.addTarget(...) to add a CloudWatch Logs Group target to an EventBridge Rule is creating a Custom Lambda resource which is consistently timing out, leading to CFN deployment failures in China partition regions #29373

@GavinZZ

Description

@GavinZZ

Describe the bug

This logic is employed in approximately ~30 AWS regions, including commercial, china, and gov-cloud partition regions.

It looks like what the addTarget(...) action does is create a custom Lambda CFN resource (along with associated IAM policies) to perform the intended actions in our AWS accounts. However, as of at least ~Jan 11th, 2024, the custom Lambda resource has been consistently failing during our deployments in BJS and ZHY regions with the following error:

UPDATE_FAILED

CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [9833c61e-99a2-4426-be43-189b3fa8613d]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.

Diving deeper into the Lambda (AWS679f53fac002430cb0da5b7982bd22872D164C4C) logs for the custom resource shows the following logs:

START RequestId: 66de5d1d-40b2-49d2-b3a3-47761d6b9a98 Version: $LATEST

2024-02-27T16:15:34.662Z 66de5d1d-40b2-49d2-b3a3-47761d6b9a98 INFO Installing latest AWS SDK v2

2024-02-27T16:17:34.764Z 66de5d1d-40b2-49d2-b3a3-47761d6b9a98 Task timed out after 120.10 seconds

END RequestId: 66de5d1d-40b2-49d2-b3a3-47761d6b9a98

Expected Behavior

Should be able to deploy in CN regions

Current Behavior

Fails due to deployment time out, likely due to installing latest AWS SDK call time out in CN regions

Reproduction Steps

N/A

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.131.9

Framework Version

No response

Node.js Version

18

OS

MacOs

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions