Create a CloudFormation stack and use Rolling Updates to update the application version deployed to your EC2 instances.
- Create a CloudFormation stack based on an existing template.
- Open CloudFormation in AWS Management Console.
- Click Create Stack button.
- Select Upload a template to Amazon S3.
- Choose file
learn-cloudformation/lab9-rolling-update/demo.yaml
. - Click Next button.
- Insert
lab9-$username
as stack name. Replace$username
with your username (e.g. lab9-awittig). - Select two random subnets and the only available VPC as Parameters.
- Insert
1
as VersionParameter. - Click Next button.
- Skip next step by clicking on Next button.
- Review your input and click Create button.
- Wait until your stack reaches status CREATE_COMPLETE.
- Select your stack by clicking on row of the table.
- Switch to the Outputs tab.
- Search for *ELB and click on the URL.
- A website showing
Version 1
should appear. - Select your stack by clicking on row of the table again.
- Select Update Stack from the Actions menu.
- Select Use current template and click Next.
- Insert
2
as VersionParameter. - Click Next.
- Click Next.
- Click Update.
- Wait until your stack reaches status UPDATE_COMPLETE.
- Select your stack by clicking on row of the table.
- Switch to the Outputs tab.
- Search for ELB and click on the URL.
- A website showing
Version 2
should appear. - Select your stack by clicking on row of the table again.
- Select Delete Stack from the Actions menu.
- Confirm the deletion of your stack.
- Congratulations! You are done with the lab!