Production: Create Staging Stack
Explore how to create and manage a separate staging stack by extracting resources into nested CloudFormation templates. Learn to configure parameters, use S3 buckets for storing packaged templates, and automate deployments effectively. This lesson helps you organize your AWS infrastructure for better environment separation and reliable staging deployments.
We'll cover the following...
Objective
- Create separate environments for staging.
Steps
- Extract common resources out of
main.yml. - Create a separate stack for staging.
Creating a nested stack for staging #
Next, we’re going to move all the resources we’ve created for our staging environment into a separate staging stack. We’ll do this by extracting the staging resources into a file called stage.yml. (Here, ‘stage’ refers to a deployment step, not to the staging environment itself.)
To perform this split, it’s easier if we start by copying the whole main.yml file.
Now, let’s delete the following resources from stage.yml:
DeploymentRoleBuildProjectDeploymentApplicationStagingDeploymentGroupPipelinePipelineWebhook