aws cloudformation for atomic stack-update

+3 votes

I have a stack consisting of

  1. ec2 instances as an application server
  2. one ELB as a load balancer
  3. two Elasticsearch nodes

If I update the stack for whatever reason, perhaps to increase the number of application servers, all new components are ready to handle my current stack and my current stack is replaced by the new one at the same time, like atomic operations in database systems?

Since this reduction involves the desharding of existing data in Elasticsearch, does the same procedure also apply if I reduce the number of Elasticsearch nodes?

Mar 27, 2018 in AWS by Atul
• 10,240 points

retagged Oct 12, 2018 by Kalgi 822 views

1 answer to this question.

0 votes

When you perform a stack update, only the resources that you modify will be updated or replaced. In your use case, if you make changes in the number of nodes in your ES cluster, your EC2 and ELB instances will stay in place and will not change.

If you want to check which resources will affect the changes made by your template, you can use the  CloudFormation Change Sets to preview the changes before applying them.

If you just add the number of instances in your auto scaling group, the existing ones will remain there. However, if you reduce the number of instances in your ASG, the oldest ones will be deleted first. You can use the AutoScalingRollingUpdate policy to gain control over it.

In addition, when you upgrade, you can specify a replacement for your entire ASG with a new one, including all new instances of EC2. Using the AutoScalingReplacingUpdate policy, you can customize this behavior.

answered Mar 27, 2018 by DareDev
• 6,890 points

Related Questions In AWS

0 votes
1 answer

How to provide tags for the stack in CloudFormation Template?

In the template anatomy, you cant set ...READ MORE

answered Aug 13, 2018 in AWS by bug_seeker
• 15,520 points
+1 vote
1 answer
0 votes
1 answer

How to create new stack using create-change-set in AWS Cloudformation

The type of change set operation. To ...READ MORE

answered Sep 18, 2018 in AWS by Priyaj
• 58,090 points
0 votes
1 answer
0 votes
1 answer

How to create or update tags for an Auto Scaling group in AWS?

Hi@akhtar, You can create or update tags for the specified ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,440 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP