Is the cloudformation team sadistic, selfish, or just stupid? Nested stacks must reference each other via an S3 url, why?
Every time I prepare to use nested stacks, I always check to see whether the deployment process has changed or if it is still has the imbecilic requirement that we upload template files with an s3 url to the child template files, instead of simply uploading a zip file with local references. I guess the benefit is that you can reuse your stupid cloudformation templates across stacks by pointing to them? That's great but could we just have the option to upload a zip archive instead? Or, better yet, upload a zip archive directly to the Cloudformation service so that we don't need to create an s3 bucket? This adds 2 or 3 build steps for deploying infrastructure and its always felt clunky.
Does AWS benefit from this schema in some way?
Anyways, good morning everybody I hope you are doing well
Posted Nov 6, 2019, 3:54 PM UTC
You might want to look at the "package" command in the cli. The project I'm working with run it as part of our codebuild stage.
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html
"Packages the local artifacts (local paths) that your AWS CloudFormation template references. The command uploads local artifacts, such as source code for an AWS Lambda function or a Swagger file for an AWS API Gateway REST API, to an S3 bucket. The command returns a copy of your template, replacing references to local artifacts with the S3 location where the command uploaded the artifacts.
Use this command to quickly upload local artifacts that might be required by your template. After you package your template's artifacts, run the deploy command to deploy the returned template."