How to create a UserData for a LauchConfiguration — AWS CloudFormation

Alvaro Andres Pinzon Cortes
3 min readDec 18, 2019

--

1. Create the UserData and test it to make sure it works

  1. Create an AWS S3 bucket and ALLOW public access to the bucket

2. Upload the index.html file in the bucker

3. Test the commands that you want to use in your terminal connecting to he instance using SSH: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

4. Create an EC2 instance and use this UserData

You need to replace the last URL with the URL of your index.html in the S3 bucket. You can find the URL in here:

This is how you create the instance:

3. Copy the public dns and open it on a browser

2. Add the UserData to the Launch Configuration

--

--

No responses yet