0

I have completely understood the concept of Auto-Scaling in AWS. My only question is, what AMI will the launch configuration use while in production environment?

According to my understanding Image of existing instance should be used. Lets say I have used an image of existing instance.

What if there are any changes in existing instance in future? In this scenario we have to update the AMI.

Is there any process to automate this process?

1
  • As you seem to start on this topic, you should know that upscaling is easy, downscaling is where the problems usually begin. If your app can handle 2 VM, then no worry for 3 or 4 or n... But what happen if I kill randomly your servers ? – Clément Duveau Jul 29 '20 at 16:57
0

Auto-scaling is designed to be used with "immutable" EC2 instances. Meaning, the EC2 instances under control of auto-scaling won't be changed or updated.

Data that is uploaded to such EC2 instances is usually saved somewhere off the instance (off instance database, S3 object store, etc.)

For software/application updates, you usually wouldn't update the EC2 instances directly. Instead, you have a process to create a new "master" AMI image. Once you have the new master AMI image, you update your Auto Scaling group to use the new image.

There are many available processes you can choose from to create your new AMI images.

All this being said, you can modify/update your EC2 instances that are under control of Auto Scaling. But this may only really work if your Auto Scaling group has a min = max = size of 1. Anything more than 1 and you really want to have another process to create your master AMI image.

1
  • Yes I understood the process that you have mentioned thanks for writing in detail. As, I am a newbie could you please tell me how to create an AMI automatically and update the ASG to use the updated AMI. Can this be automated? – Subramanian Lakshmanan Jun 10 '20 at 4:24
0

Use something like packer to automate the process of updating the AMI. Their getting started guide contains an example what needs to be done for AWS AMIs.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.