Create an EC2 Instance using AWS CLI

+1 vote
Can someone help me with creating an EC2 instance using AWS CLI?
Feb 15, 2019 in AWS by Theodore
7,412 views

2 answers to this question.

0 votes

You can use the following command to create an EC2 Instance:-

C:\Users\priyj_kumar>aws ec2 run-instances --image-id ami-0080e4c5bc078760e --key-name yourkeyname --instance-type t2.micro --region us-east-1 --subnet-id your-subnet-id --count 1
answered Feb 15, 2019 by Priyaj
• 58,020 points

After creation of the EC2 instance you will get a log like this:-

Thank you. This works fine. There will be a log can you share that aswell
Hello @Dev, its already uploaded you can have a look at it.
Thank you priyaj, the command works fine. I changed the count to 3 and got 3 instances. This is easy rather than creating 3 instance again and again
0 votes
answered Feb 15, 2019 by Dev
• 360 points

Related Questions In AWS

+1 vote
2 answers

How to launch and access an instance using AWS-CLI?

aws ec2 run-instances --image-id ami-id --key-name yourkeyname ...READ MORE

answered Feb 23, 2019 in AWS by Shashank
• 1,370 points
1,928 views
+1 vote
2 answers

How to create an EC2 instance in AWS Console?

Here is a step by step guide ...READ MORE

answered Feb 11, 2019 in AWS by Shubendu
2,198 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

Launching an EC2 Instance using AWS SDK Java

package com.ec2application.ec2application; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.ec2.AmazonEC2; import ...READ MORE

answered Jan 22, 2019 in AWS by Priyaj
• 58,020 points
6,892 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP