You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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
Closed
GavinZZ opened this issue
Mar 6, 2024
· 1 comment
· Fixed by #29374
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:
…29374)
### Issue # (if applicable)
Closes#29373
### Reason for this change
AWS Log Group event target by default installs the latest aws sdk for its custom resource and this would fail in `aws-cn` partition. This PR exposes the `installLatestAwsSdk` to the surface and allows users to optionally turn off `installLatestAwsSdk` for cloudwatch log events target.
### Description of changes
Allow users to override the value, if unset default to true which is the same behaviour as current.
### Description of how you validated changes
all tests pass.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
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
The text was updated successfully, but these errors were encountered: