-
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 doesn't create CloudFormation without full credentials (1.20.0) #5791
Comments
Are you preforming any fromAttributes(....) calls or uploading any assets in your code? My understanding is that these are the ones that require credentials for |
Can you show the code that's causing this @RenkeMeuwese ? |
in addition to the code as requested by @skinny85 can you also run the command with |
Replicated the error in 1.21.1. I can see that despite the error message, the cdk.out is populated when performing cdk synth. However, the cdk.context.json is empty and the CLI seems to suggest that the synth step failed.. See the difference in output below when using a dummy value for account or an authenticated account. |
Attached the output with -v |
Attached: code that causes the error. |
Allow using an existing `DockerImageAsset` object as a container image in order to enable direct access to `DockerImageAsset`s API such as accessing the ECR repository, the source hash or granting permissions. The reason this could not have been exposed through the normal `fromImageAsset` is that `ContainerImage` can be used multiple times (i.e. be bound to multiple container definitions), so there is no reliable way to allow users to access the asset. Related to #5791 and #5983
Allow using an existing `DockerImageAsset` object as a container image in order to enable direct access to `DockerImageAsset`s API such as accessing the ECR repository, the source hash or granting permissions. The reason this could not have been exposed through the normal `fromImageAsset` is that `ContainerImage` can be used multiple times (i.e. be bound to multiple container definitions), so there is no reliable way to allow users to access the asset. Related to #5791 and #5983
Is there any update? I have the same issue: as soon as I've added VPC to my CDK code,
|
In CDK version 1.20.0 the command CDK synth now needs full credentials to run. This is an undocumented (?) breaking change. Creating a CloudFormation template for an account and region without the linked secret key and key ID is no longer possible. This means that my company currently cannot use 1.20.0, as the access key id and secret access key would not be available in the development of the templates. For automatic testing this would also be breaking, as we would obviously not want to have the full credentials in the repository that would do an integration test. Surely CDK should (continue to) be able to create templates without needing deployment credentials at that stage.
Reproduction Steps
Create an environment with an AWS_REGION and an AWS_ACCOUNT, but without a matching AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY.
Error Log
[Error at /test/skeleton] Need to perform AWS calls for account [redacted], but no credentials found. Tried: default credentials.
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: