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 62 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,810 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,350 points
3,320 views
+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
• 56,520 points
289 views
0 votes
1 answer
0 votes
3 answers
0 votes
2 answers
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
0 votes
1 answer