Creating Linux Instance Using CLI
Creating Linux Instance Using CLI
Make sure you have the AWS CLI installed. Download Link
To configure AWS using the AWS CLI, IAM user credentials are required. These credentials,
including an access key ID and secret access key, must belong to an IAM user.
www.pitcsolutions.com
ii. Navigate to IAM Dashboard.
www.pitcsolutions.com
iii. Navigate to User groups and click Create group.
iv. Now provide User group name and attach permission policies as required and Click
create group at the bottom right corner.
www.pitcsolutions.com
v. Navigate to Users and click Create user.
www.pitcsolutions.com
Now, Select Permission options, then select user groups and click Next.
www.pitcsolutions.com
vii. Now, navigate to ‘Users’ and then click on the User name i.e. ‘user1’
www.pitcsolutions.com
Scroll down and to Access keys and click Create access key.
www.pitcsolutions.com
Now, Click ‘Create access key’.
The .csv file contains “Access key ID, Secret access key”.
www.pitcsolutions.com
ix. Now to Configure AWS CLI, open ‘cmd’ prompt.
Now provide Access Key Id, Secret Key Access which are present in the
downloaded .csv file.
www.pitcsolutions.com
Step3: Creating EC2 instance.
www.pitcsolutions.com
Then, Click Instances.
www.pitcsolutions.com
Open cmd prompt.
www.pitcsolutions.com
We can use the “authorize-security-group-ingress” command.
“aws ec2 authorize-security-group-ingress --group-id your_group_id --protocol tcp --port
80 --cidr 0.0.0.0/0”
www.pitcsolutions.com
3. To Stop & Terminate Instance Using CLI
www.pitcsolutions.com
www.pitcsolutions.com