(assets): enable deploying to one region with assets in another region
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 122
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 71
Description
### Describe the feature
Referencing the original issue https://github.com/aws/aws-cdk/issues/35670#issuecomment-3382977593
TLDR: support deploying WAF and Cloudfront in European organisations with strict internal policys as to where you are allowed to create s3 buckets (since creation of s3 buckets in us-east-1 is currently required to deploy WAF and Cloudfront in us-east-1 via cdk (not cloudformation)).
### Use Case
Unable to adhere to internal policy and still be able to deploy WAF in front of Cloudfront as that currently requires a full bootstrap in us-east-1.
### Proposed Solution
This feature requires changes to both aws-cdk and aws-cdk-cli. In aws-cdk-cli changes need to be made to (at least) `makeBodyParameter` as this currently uses the deploy region to assemble an s3 url for the stack and does not have access to the synthesizers assetRegion. In aws-cdk changes need to be made to (at least) `cloudFormationLocationFromFileAsset` in the Synthesizer such that it makes the assetRegion available in the manifest. This could of course be a completely custom synthesizer but I think it would be better to keep it inside the default synthesizer.
There could be additional places where the `s3://bucket/key` s3 url:s are incorrectly converted to region specific endpoints using the deployRegion rather than the assetRegion but these are the ones I've found thus far.
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.1029.3
### Environment details (OS name and version, etc.)
MacOS
Contributor guide
Assessment
This issue has not been assessed yet.