'cloudformation deploy' fails with S3 error
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
Hello everyone.
I am working with CloudFormation in multiple regions. The process used to be pretty straight forward:
1. Create a S3 bucket
-> `aws s3 mb s3://my-stack-cft --profile region-1`
2. Package the templates
-> `aws cloudformation package --profile region-1 --template-file my-stack.yaml --s3-bucket my-stack-cft --output-template-file my-stack.packed.yaml`
3. Deploy the templates to multiple regions
-> `aws cloudformation deploy --profile region-1 --template-file my-stack.packed.yaml --stack-name my-stack`
-> `aws cloudformation deploy --profile region-2 --template-file my-stack.packed.yaml --stack-name my-stack`
-> ...
This worked flawlessly, until now. When I tried to update the stack in a region, the deploy command failed with the message:
> An error occurred (ValidationError) when calling the CreateChangeSet operation: S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
Some debugging and it turned out that `aws cloudformation deploy` now seems to be unable to access CloudFormation Templates that have been uploaded by `aws cloudformation package` into a bucket "in a different region" (even though there shouldn't be anything like "a different region" for buckets).
Creating new buckets in all regions and uploading the templates to all of them solved the Issue but leaves a very bad taste since now all regions have to be kept in sync.
Question now is: Is this behavior intended and if so, is there any better solution (e.g. additional S3 bucket config) that restores the old behavior?
Contributor guide
Assessment
This issue has not been assessed yet.