This code in RestApi
|
const resource = new CfnAccount(this, 'Account', { |
will update the account level role for cloudwatch logging used for all ApiGateways.
The problem we are seeing is that each new API we create will replace the role used for the account with the new role created.
If the stack that last updated the account level role gets deleted for some reason then the account level role will no longer exist and all apigateway cloudwatch logging is broken for the account 😱
Reproduction Steps
- create a new RestApi without passing a cloudWatchRole prop
- Deploy the new API - see the account level role change to the role associated with this new API
- Delete the stack
- All account level API logging no longer works because the role is deleted.
What did you expect to happen?
I would expect each apigateway logging role to be only used for a given API Gateway
or I would want the apigateway account level role to be rolled back to the previous role on deletion
What actually happened?
Described above
Environment
- CLI Version :
- Framework Version:
- Node.js Version:
- OS :
- Language (Version):
Other
Is passing a role into each API the best option to resolve this?
This is 🐛 Bug Report
This code in RestApi
aws-cdk/packages/@aws-cdk/aws-apigateway/lib/restapi.ts
Line 485 in 71aa4b6
will update the account level role for cloudwatch logging used for all ApiGateways.
The problem we are seeing is that each new API we create will replace the role used for the account with the new role created.
If the stack that last updated the account level role gets deleted for some reason then the account level role will no longer exist and all apigateway cloudwatch logging is broken for the account 😱
Reproduction Steps
What did you expect to happen?
I would expect each apigateway logging role to be only used for a given API Gateway
or I would want the apigateway account level role to be rolled back to the previous role on deletion
What actually happened?
Described above
Environment
Other
Is passing a role into each API the best option to resolve this?
This is 🐛 Bug Report