EC2userdata

Creating an AWS EC2 instance with user data / Launching EC2 Instances and test user data

Creation Date: October 18, 2023
Created By: Yeison Giraldo

1. Click on Launch instances

Click on Launch instances

Click on Launch instances

2. Type "myWebServer"

Type "myWebServer"

3. Click on Amazon Linux

Click on Amazon Linux

4. Click on t2.micro…

Click on t2.micro…

5. If you have a Key pair already on AWS you can use it or create a new one

If you have a Key pair already on AWS you can use it or create a new one

6. Click on Network settings Info…

Click on Network settings Info…

7. Click on Edit for network options

Click on Edit for network options

8. Click on Firewall (security groups) to create a new one or select another SG

make sure you select the correct VPC and Subnet for your EC2

Click on Firewall (security groups) to create a new one or select another SG

9. We will select a SG that was already made

We will select a SG that was already made

10. for EBS keep the default or change it to whatever size you need

for EBS keep the default or change it to whatever size you need

11. Click on Advanced details Info

This is where we will inject the user data to the EC2 when it first boots up

Click on Advanced details Info

12. Right click on User data -

Paste the Script for the EC2 to run when it boots

Click on "launch instance"

Right click on User data -

13. You will get a successfully message

You will get a successfully message

14. Verify the user data has been loaded by going into the EC2

Click on View details

Verify the user data has been loaded by going into the EC2

15. Copy URL or click on it

Copy URL or click on it

# Launching Amazon EC2 Instances | Self-Paced Labs

16. Verify the user data has been loaded by going into the EC2

You should see a message showing the expected output

Verify the user data has been loaded by going into the EC2