0
0
AWScloud~20 mins

Basic CLI commands (s3, ec2) in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
AWS CLI Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Understanding AWS S3 Bucket Creation Behavior

You run the command aws s3 mb s3://my-unique-bucket-12345. What is the expected result if the bucket name is globally unique and you have permissions?

AWS
aws s3 mb s3://my-unique-bucket-12345
AThe bucket is created and a success message is shown.
BThe command lists all existing buckets instead of creating one.
CThe command fails with an error about invalid bucket name.
DThe command creates a folder inside an existing bucket.
Attempts:
2 left
💡 Hint

Think about what mb means in the AWS S3 CLI.

Configuration
intermediate
2:00remaining
Correct AWS CLI Command to List EC2 Instances

Which AWS CLI command correctly lists all EC2 instances in the default region?

Aaws ec2 get-instances
Baws ec2 list-instances
Caws ec2 show-instances
Daws ec2 describe-instances
Attempts:
2 left
💡 Hint

Think about the AWS CLI command that describes resources.

Architecture
advanced
2:00remaining
Choosing the Right AWS CLI Command for EC2 Instance State Change

You want to stop an EC2 instance with ID i-0abcd1234efgh5678 using AWS CLI. Which command will correctly stop the instance?

Aaws ec2 stop-instances --instance-ids i-0abcd1234efgh5678
Baws ec2 start-instances --instance-ids i-0abcd1234efgh5678
Caws ec2 reboot-instances --instance-ids i-0abcd1234efgh5678
Daws ec2 terminate-instances --instance-ids i-0abcd1234efgh5678
Attempts:
2 left
💡 Hint

Stopping an instance is different from terminating or rebooting it.

security
advanced
2:00remaining
AWS CLI Command Impact on S3 Bucket Permissions

You run aws s3 cp file.txt s3://mybucket/ without specifying any ACL options. What is the default permission behavior for the uploaded file?

AWS
aws s3 cp file.txt s3://mybucket/
AThe file is uploaded with public read permissions.
BThe file is uploaded with private permissions, accessible only to the bucket owner.
CThe file is uploaded with permissions inherited from the bucket policy.
DThe upload fails due to missing ACL specification.
Attempts:
2 left
💡 Hint

Think about default ACL behavior when none is specified.

Best Practice
expert
3:00remaining
Best Practice for AWS CLI EC2 Instance Tagging During Launch

You want to launch an EC2 instance and tag it with Environment=Production using a single AWS CLI command. Which command correctly achieves this?

Aaws ec2 run-instances --image-id ami-12345678 --count 1 --instance-type t2.micro --tag Key=Environment Value=Production
Baws ec2 run-instances --image-id ami-12345678 --count 1 --instance-type t2.micro --tags Key=Environment,Value=Production
Caws ec2 run-instances --image-id ami-12345678 --count 1 --instance-type t2.micro --tag-specifications 'ResourceType=instance,Tags=[{Key=Environment,Value=Production}]'
Daws ec2 run-instances --image-id ami-12345678 --count 1 --instance-type t2.micro --tag-specifications 'Tags=[{Key=Environment,Value=Production}]'
Attempts:
2 left
💡 Hint

Tagging requires specifying resource type and tags in a specific format.