aws / aws/aws-cdk

generated content (using cdk synth) in cdk.out cannot be reused for deploying infrastructure in another region

Open
#27,063 7 comments 0 reactions 0 assignees View on GitHub
effort/large feature-request p2 package/tools
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

generated content in cdk.out cannot be reused for deploying infrastructure in another region.

![image](https://github.com/aws/aws-cdk/assets/26426283/2aa6acb6-2b1c-408d-b8f6-8435124e8492)

### Expected Behavior

With the generated content within cdk.out should be also possible to deploy the App (Intrastrukture) in another Region.

### Current Behavior

I have a simple Infrastrukture with nested stacks. Its deployment from console is possible, using cdk deploy.

I uploaded the content of cdk.out into a s3-bucket. This contains all files, template and assets.

From the AWS-Console in Cloud Formation (located in another region), I try to deploy/create a stack with the S3 URL of that template . But I get the error "S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html".

The S3 bucket allows public access and the full content of cdk.out was uploaded in that bucket

### Reproduction Steps

Using the creation of a new stack from CloudFormation:
![image](https://github.com/aws/aws-cdk/assets/26426283/5ff61dba-d2b6-4772-9982-b16a1ebcf159)

Try with the S3 URL of the bucket where is located the content of cdk.out.zip

[cdk.out.zip](https://github.com/aws/aws-cdk/files/12557836/cdk.out.zip)

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

aws-cli/2.13.12 Python/3.11.4 Windows/10 exe/AMD64 prompt/off

### Framework Version

_No response_

### Node.js Version

9.5.1

### OS

Windows

### Language

Java

### Language Version

Java 17

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the attached cdk.out.zip and reproducing the deployment from the S3 URL in the CloudFormation console in a different region. Compare that result with the working cdk deploy path and determine whether the generated template and assets can be consumed cross-region; done means the generated content deploys successfully in the target region.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.