Step 1 – Open EC2 Service :
Step 2 – Launch instance :
Sl.No | Stage/step | Details/configurations |
(i) | Name | P1-ExploreWorld_DeploymentGroup_VM-EC2-Server |
(ii) | Application and OS Images | Amazon Linux 2 AMI (HVM) – Kernel 5.10 |
(iii) | Instance type | t2.micro |
(iii) | Key pair (login) | New β Name , type=RSA , Format=.pem |
(iv) | Network settings | Allow SSH traffic from AnywhereAllow HTTP traffic from the internet |
(v) | Advanced details | User data : copy paste below data |
π | #!/bin/bashsudo yum -y updatesudo yum -y install rubysudo yum -y install wgetcd /home/ec2-userwget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/installsudo chmod +x ./installsudo ./install auto |
(i) Name : P1-ExploreWorld_DeploymentGroup_VM-EC2-Server or your wish
(ii) Instance type : t2.micro (1GB RAM – 1 Core CPU – Free Tier eligible)
(iii) Key pair : Itβs a SSH key (Itβs used to enable password less logins)
- New β Name ,
- Keypair type=RSA ,
- Private key file Format=.pem
(iv) Network settings : Using Default settings,
Allow SSH traffic from Anywhere
Allow HTTP traffic from the internet
(v) Advanced settings : Scroll down and add userdata for CodeDeploy Agent installation
CodeDeploy Agent needs to be installed on the machine to handle the CodeDeploy operations
Copy and paste the Userdata (Bootstrap) script from below
π | #!/bin/bashsudo yum -y updatesudo yum -y install rubysudo yum -y install wgetcd /home/ec2-userwget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/installsudo chmod +x ./installsudo ./install auto |
Once after clicking on Launch Instance , It will show the Success dialogue , click on blue color instance id in dialogue box
On Instances page , we can see EC2 instance showing Running
Next we need to attach S3ReadonlyAccess Role from grabbing web server files from it