-
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 Synth gives error if credentials are incomplete (1.21.1) #5852
Comments
This is suspicious to me:
Where is that account number 2 coming from? |
(That should have said |
Can you |
Seems to be coming from here:
|
I'm going to guess while running the app your environment looked like this:
You're probably intending to use |
@RenkeMeuwese - could you please follow up with the suggestions that @rix0rrr has outlined? I also suspect that this is because of your environment set-up. starting with |
@rix0rrr : you're right, the cli tries to match the os environment with the account '2', which is a dummy account used in the creation of this test project. There is a local file, env.aws.development which is loaded which has this account in it. And indeed this fails. However, in 1.19.0 this doesn't cause any failure, as cdk synth just doesn't look for full credentials. Using the cdk to create infrastructure as code in a predictable way, we want to continue to be able to produce cloudformation templates without having to provide full credentials every step of the way. |
So after some team discussion we discovered that this behavior change comes from #5594. We were creating a NestedStack which looks for availability zones and needs the names of those zones. In 1.19.0 this value was not needed for cdk synth. Documentation on the functionality of cdk.context.json is desireable. |
This is a reposting of #5791, which was linked to PR #5803 but persists from 1.20.0 to 1.21.1.
Reproduction Steps
Using an account not linked to credentials from the default configuration gives errors in the execution of cdk synth.
Error Log
Environment
Other
Attached: output file with -v, and output with authentication, which is what we do not want to do at the stage that cdk synth is called. And the code that causes the error, zipped.
Archive.zip
output-v.pdf
outputdummyvsauthenticated.pdf
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: