-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-cloudformation: CfnStackSet requires bootstrap in all regions and cannot find assets on different regions #26310
Comments
This wouldn't work because the assets have to actually be uploaded - the code you have won't trigger assets to upload in any region. |
@peterwoodworth thank you for your reply, I tried this lib already but also got stuck as well, that's why I am trying out with the L1 constructs: cdklabs/cdk-stacksets#171 From my understanding, |
Assets are uploaded as part of each individual stack deployed through CDK. If a stack is being deployed through a In short, if your stack has assets and you depend on CDK uploading those assets and defining their locations, |
Looks like you are trying to deploy the same stack to multiple regions. Why not just deploy like this: const envUE1 = { region: 'us-east-1', account: process.env.CDK_DEFAULT_ACCOUNT };
const envEC1 = { region: 'eu-central-1', account: process.env.CDK_DEFAULT_ACCOUNT };
new ReplicaStack(stage, 'ReplicaStackUE1', { env: envUE1);
new ReplicaStack(stage, 'ReplicaStackEC1', { env: envEC1); On |
Yes, hopefully this will suffice in the meantime. If you want to follow up with the issue with the current solution, the best place to discuss that will be in the repo for that construct where you already have an issue open. If you desire to see this working as part of the official CDK library, that is being tracked as a feature request here. If you need any more help getting something setup with the tools available, please create a discussion |
|
Describe the bug
I have a CDK app which consists of:
MainStack
;ReplicaStack
;ReplicaStackSet
;ReplicaStack
andReplicaStackSet
are defined on the scope ofMainStack
.MainStack
is deployed oneu-central-1
and CDK is bootstrapped oneu-central-1
. When settingstackInstancesGroup.regions
ofReplicaStackSet
to['eu-central-1', 'us-east-1']
I get the error:After bootstrapping
us-east-1
as well and trying to deploy the app again, I get the error:I believe this means that when deploying the instances of
ReplicaStack
, CloudFormation is looking for the assets on the region where the instance is being deployed, instead of the region whereReplicaStackSet
is deployed.Expected Behavior
The deploy should work and should create my
MainStack
,ReplicaStackSet
on regioneu-central-1
and two instances ofReplicaStack
on the regionseu-central-1
andus-east-1
Current Behavior
Deploy fails with message
[Unable to fetch parameters [/cdk-bootstrap/hnb659fds/version] from parameter store for this account.]
whenus-east-1
is not bootstrapped andError occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist
and it is bootstrappedReproduction Steps
Create
ReplicaStack
:Create
MainStack
:define the app:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.87.0 (build 9fca790)
Framework Version
No response
Node.js Version
v16.19.0
OS
MacOS Ventura 13.0
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: