(aws-apigateway): CDK Api Gateway Construct missing dependency between Stage and internally created CloudWatch Role #12701
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
I am using CDK to create our API GW component using JAVA implementation.
I found when deploying our stack to a new AWS account, API gateway is trying to deploy the Stage before the Cloudwatch role is being completed, causing "cdk deploy" to fail and rollback. Please check the 1st attached image to see the sequence of events happening in the stack.
I came up with a workaround as you see in the 2nd screenshot, and it seems to work as shown in the 3rd screenshot. I don't think it is an ideal workaround.
As per the documentation for SpecRestApi construct -see 4th screenshot, the CloudWatch Role will be created automatically (the default is true for this boolean)
Can you please help with this, I think it is a defect in CDK .. maybe I am mistaken.
Thanks
Reproduction Steps
What did you expect to happen?
Create Api Gateway.
What actually happened?
Failed to create Api gateway due to missing CloudWatch role.
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: