In this tutorial, you'll learn how to preview your stack changes using change sets in AWS CloudFormation.
When you have to update a stack, understanding how your changes will affect running resources before you implement them can help you update stacks with confidence.
Change sets allow you to preview how proposed changes might impact your running resources.
AWS CloudFormation makes the changes to your stack only when you decide to execute the change set, allowing you to decide whether to proceed with your proposed changes or not.
You can create change sets using the CloudFormation console, AWS CLI, or CloudFormation API.
_
Video Transcript:
_
Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to create a chain set to preview your stack changes before deploying them in AWS cloud formation. Let's get into it. Let's start by navigating to the cloud formation service and then click on create a stack with new resources.
Here I'm going to upload a template file called ec2.yaml. In this file, I'm starting with a resources section with a resource defined called web server instance which is of the type EC2 oh. Under properties, I have the availability Zone IAM instance profile image ID security IDs instance type and tags defined.
Let's upload this template file then hit next. Give your stack a name then click on next. I'm going to leave all these stack options to their default values and then click on next.
Review your stack configuration then click on the create chain set button a chain set is a preview of how the stack will be configured before creating it. I'm going to leave the chain set name to its default name then hit the create chain set button. give it some time then hit refresh and the preview of your changes should show up in the changes tab. Here we see an action of type add for the web server instance which is of the type EC2.
You can also review your template and Json changes. Hit refresh in the overview section and your execution status should now say available. Click on the executed change button review. You now pullback options and you should see or stack in create in progress status.
Give it a few minutes and your stack should eventually change to create an underscore complete. Navigate to the resources tab then click on the physical ID to confirm that your EC2 instance is indeed up and running. If you head to the tags tab you'll notice that the environment key has a value of prod as we configured in our template file.
Say we wanted to change the environment value to QA. To do that let's head back to our EC2.file and update the tag value. Keep your formation navigate back to the cloud formation window then click on the stack actions drop-down and choose to create a chain set for the current stack.
Click on replace current template then upload the updated ec2 for the EML file, and hit next. Give your change set a name then click on the next button. Review your stack options and stack configuration then hit submit.
This time you should see an action type of modification in the changes tab. Review your template and Json changes then hit the refresh button in the overview section. click on execute change set and your stack status should change to update in progress. Give it a few minutes for the status to change to update underscore complete then head to the resources tab.
Click on the physical ID then go to the tab. Confirm that the environment value is now showing QA. There you have it. If you have any questions, leave them in the comments section below.
Don't forget to like, subscribe, and turn on your notification bell. Until next time.
Негізгі бет How To: Change Set In CloudFormation | AWS | Preview Stack Changes Before Deploying
Пікірлер: 1