0
0
AWScloud~5 mins

Basic CLI commands (s3, ec2) in AWS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What command lists all your S3 buckets using AWS CLI?
Use aws s3 ls to list all your S3 buckets. It shows bucket names and creation dates.
Click to reveal answer
beginner
How do you create a new S3 bucket named 'mybucket' in AWS CLI?
Use aws s3 mb s3://mybucket. 'mb' means make bucket.
Click to reveal answer
intermediate
Which command shows all running EC2 instances?
Use aws ec2 describe-instances --filters Name=instance-state-name,Values=running to see running EC2 instances.
Click to reveal answer
beginner
How to start an EC2 instance with ID 'i-1234567890abcdef0' using AWS CLI?
Use aws ec2 start-instances --instance-ids i-1234567890abcdef0 to start the instance.
Click to reveal answer
beginner
What command copies a file 'photo.jpg' from your computer to an S3 bucket 'mybucket'?
Use aws s3 cp photo.jpg s3://mybucket/ to copy the file to the bucket.
Click to reveal answer
Which AWS CLI command lists all your S3 buckets?
Aaws s3 list-buckets
Baws s3 ls
Caws s3 show
Daws s3 get-buckets
How do you stop an EC2 instance with ID 'i-abc123'?
Aaws ec2 stop-instances --instance-ids i-abc123
Baws ec2 shutdown --instance i-abc123
Caws ec2 terminate-instances --instance-ids i-abc123
Daws ec2 stop-instance --id i-abc123
Which command uploads a file 'data.txt' to S3 bucket 'mybucket'?
Aaws s3 cp data.txt s3://mybucket/
Baws s3 put data.txt s3://mybucket/
Caws s3 upload data.txt s3://mybucket/
Daws s3 send data.txt s3://mybucket/
What does the command aws ec2 describe-instances do?
ADeletes EC2 instances
BStarts all EC2 instances
CLists details of EC2 instances
DCreates a new EC2 instance
How to create a new S3 bucket named 'photos'?
Aaws s3 make-bucket photos
Baws s3 create-bucket photos
Caws s3 new-bucket photos
Daws s3 mb s3://photos
Explain how to list, create, and upload files to an S3 bucket using AWS CLI.
Think about commands starting with 'aws s3' and their short forms.
You got /3 concepts.
    Describe how to check running EC2 instances and start or stop an instance using AWS CLI.
    Focus on 'describe-instances', 'start-instances', and 'stop-instances' commands.
    You got /3 concepts.