Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to list all S3 buckets using AWS CLI.
AWS
aws s3 [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands that create or delete buckets instead of listing.
✗ Incorrect
The aws s3 ls command lists all S3 buckets in your AWS account.
2fill in blank
mediumComplete the code to automate EC2 instance start using AWS CLI.
AWS
aws ec2 [1] --instance-ids i-1234567890abcdef0
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using stop or terminate commands by mistake.
✗ Incorrect
The start-instances command starts the specified EC2 instance.
3fill in blank
hardFix the error in the AWS CLI command to copy a file to S3 bucket.
AWS
aws s3 [1] myfile.txt s3://mybucket/ Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'copy' instead of 'cp', which causes an error.
✗ Incorrect
The correct AWS CLI command to copy files to S3 is aws s3 cp.
4fill in blank
hardFill both blanks to create a new IAM user with AWS CLI.
AWS
aws iam [1] --user-name [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid commands like 'new-user' or 'add-user'.
✗ Incorrect
The correct command is aws iam create-user --user-name USERNAME. 'add-user' is not a valid AWS CLI command.
5fill in blank
hardFill all three blanks to automate EC2 instance creation with AWS CLI.
AWS
aws ec2 [1] --image-id [2] --count [3] --instance-type t2.micro
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start-instances' which only starts existing instances.
✗ Incorrect
The command aws ec2 run-instances launches new instances. You specify the AMI ID and the number of instances with --image-id and --count.