Skip to content

How do I create a Launch instance with a set of components that I want to install on a new Instance

0

I have an instance on which I have hosted a database and my application backend. I want to configure Auto scaling group based on my launch instance. I have all this configured, but the problem is that it creates empty instances in which there is neither docker nor my application backend. How can I configure a launch template so that my backend can be deployed on it?

asked 2 years ago328 views
1 Answer
0
Accepted Answer

The first option - use EC2 User Data script to install all required software on the start https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html

The second option - create AMI from the current instance and use this AMI later in your Autoscaling group for new instances. New instances will have all software https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/tkv-create-ami-from-instance.html

The third option - use SSM document to apply changes to your instances (install everything) https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html

EXPERT
answered 2 years ago
AWS
EXPERT
reviewed 9 months ago
  • Thank you. I already tried to do this using user data but did not understand what was wrong with my script. I didn’t see the log file when I read the manual and didn’t understand what was wrong. Turns out I had a couple of errors in the script and was using commands using sudo. I figured it out with my script and it helped

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Relevant content