I have a Cloud Formation stack to create an S3 bucket. That S3 bucket will be used to store static website data, like HTML files, images, etc. I have Another Cloud Formation template to create the servers, Load Balancer, Autoscale group, Launch Configurations, etc.
I'm new in AWS DevOps stuff, sorry if this is the wrong question or the wrong way of doing it. I know it can be done through a Pipeline.
I need to know if there is any chance (out of a pipeline configuration) to create maybe a .sh script to run the s3 stack, wait for it to complete, upload the files, and then send it to create the servers stack to fetch those files from S3 bucket created in the previous stack.
CodePudding user response:
I would probably go for a CodePipeline solution, if you want to handle from a single step.
- trigger stage - I would assume it is some event in some repository (CodeCommit)
- S3 deploy stage (create a CloudFormation Template, place it into the repository) use a CloudFormation template to deploy the S3
- Upload stage (upload the files to the S3 - custom script running on Lambda or CodeBuild
- Application deploy stage, deploy the second stage using the Second CloudFormation template