Login back to AWS Management console and create user with programmatic access Refer
Topic 5 download ACCESS Key and secret key
Start Menu ? Run ? cmd
cd C:\Program Files\Amazon\AWSCLI\bin
Change your directory path to above mentioned
>aws configure
Create S3 Bucket
Bin> aws s3 mb s3://servercomputerbucket
make_bucket: servercomputerbucket
List S3 buckets
Bin> aws s3 ls
Upload Object to S3 Bucket
aws s3 cp D:\Red_Hat_Enterprise_Linux-7-System_Administrators_Guide-en-US.pdf
s3://servercomputerbucket
List Objects in S3 Bucket
Bin> aws s3 ls s3://servercomputerbucket
Delete Object from S3 bucket
Bin> aws s3api delete-object --bucket servercomputerbucket --key
Red_Hat_Enterprise_Linux-7-System_Administrators_Guide-en-US.pdf
Delete S3 bucket
Bin> aws s3api delete-bucket --bucket servercomputerbucket --region ap-south-1
Creating EC2 Instance using AWS CLI
Before creating an EC2 instance using AWS CLI collect few details
AMI ID :ami-0231704d6e7036502(server19)
Instance Type : t2.micro
Key Name (If there is no Key Pair create one) :ser.pem
Security Group ID :sg-7d8bf504
Subnet ID :subnet-35c5d95d
Bin> aws ec2 run-instances --image-id ami-06bcd1131b2f55803 --count 1 --instance-
type t2.micro --key-name KEYNAME --security-group-ids sg-857f92e9 --subnet-id
subnet-51e5592c
Bin> aws ec2 run-instances --image-id ami-0231704d6e7036502 --count 1 --instance-
type t2.micro --key-name key1(key name) --security-group-ids sg-7d8bf504 --subnet-
id subnet-35c5d95d
The Default output format specifies how the results are formatted. The value can be
any of the values in the following list. If you don't specify an output format,
json is used as the default.
json The output is formatted as a JSON string.
yaml The output is formatted as a YAML string. (Available in the AWS CLI version
2 only.)
yaml-stream The output is streamed and formatted as a YAML string. Streaming
allows for faster handling of large data types. (Available in the AWS CLI version 2
only.)
text The output is formatted as multiple lines of tab-separated string values.
This can be useful to pass the output to a text processor, like grep, sed, or awk.
table The output is formatted as a table using the characters +|- to form the
cell borders. It typically presents the information in a "human-friendly" format
that is much easier to read than the others, but not as programmatically useful.