-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(cdk-diff): >=2.11.0 not authorized to perform: cloudformation:ListStackResources #19351
Comments
I'm also seeing this error with |
Wonder if it was this PR? |
Thanks for the issue @nvick @groner, could you provide a reproduction stack? Do you have issues with just diff, or is it both diff and deploy? |
I'll see if I can put something together that is reproducible this evening. Thanks @comcalvi |
import { Stack, StackProps } from 'aws-cdk-lib'
import { Construct } from 'constructs'
import * as ec2 from 'aws-cdk-lib/aws-ec2'
import * as eks from 'aws-cdk-lib/aws-eks'
export class CdkStackDiffIssuesStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const cluster = new eks.Cluster(this, 'staging-eks', {
clusterName: 'staging',
version: eks.KubernetesVersion.V1_21,
defaultCapacity: 0,
albController: {
version: eks.AlbControllerVersion.V2_3_0
}
})
cluster.addNodegroupCapacity('staging-node-group', {
instanceTypes: [new ec2.InstanceType('t3.large')],
minSize: 1,
maxSize: 10
})
}
} If I run |
I just verified with my reproduction stack it is only |
@comcalvi I also pushed this to a repo with a devcontainer configuration. https://github.com/nvick/cdk-stack-diff-issues |
@nvick I'm unable to reproduce this error on CDK version 2.20.0, 2.10.0, or 2.11.0. I've ran |
Sure @comcalvi!
|
Thanks @nvick this reproduces the error. I'll be investigating this issue to determine root cause later. |
@nvick The source of the error is the version of
if you change |
Thanks @comcalvi! I'll try it and let you know if I run into anything else. Thanks for taking the time. |
I also got with cdk diff, how to fix it? |
I also had this issue, fixed in the interim by adding the policy to the role explicitly, in this case |
thanks, that fixes |
Same, CDK v2 doesn't let me do |
+1, hitting the same issue with the latest versions of CDK. |
I also have this problem with last version of aws-cdk |
This has long been resolved in recent version of CDK. Make sure you update to a recent version for all bugfixes. Also ensure you are using the latest bootstrap version. Closing this here. If anyone is still encountering the issue with up-to-date versions, please open a new issue. |
General Issue
cdk-[QUALIFIER]-deploy-role-[ACCOUNT]-[REGION]/aws-cdk-node is not authorized to perform: cloudformation:ListStackResources
The Question
Prior to 2.11.0 running diff just worked without errors or abnormal output. Starting at 2.11.0 and all the way through 2.15.0 I get
cdk-[QUALIFIER]-deploy-role-[ACCOUNT]-[REGION]/aws-cdk-node is not authorized to perform: cloudformation:ListStackResources
.The bootstrap version is 10.
There is a lookup role in IAM.
The trusted account and trusted lookup account is the primary/only account involved in the project.
The project was started at 2.1.0.
I'm not sure what to ask at this point, but I'm currently stuck at 2.10.0.
CDK CLI Version
2.11.0
Framework Version
No response
Node.js Version
16.13.1
OS
Debian Bullseye 11.1
Language
Typescript
Language Version
4.5.2
Other information
I did note this merged PR but I believe that came into CDK at 2.7.0.
The text was updated successfully, but these errors were encountered: