
Answer-first summary for fast verification
Answer: Use the --region parameter
Use the --region parameter: If the region parameter is not set, then the CLI command is executed against the default AWS region.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As an AWS Certified Developer Associate, you have already set up the AWS CLI on your workstation with the default region set to us-east-1. Your IAM user is granted permissions to execute commands on various AWS services including EC2, S3, and RDS across all regions. You now need to stop an EC2 instance that is running in the us-east-2 region.
Which of the following is the MOST optimal solution to achieve this goal?
A
Use boto3 dependency injection
B
You should create a new IAM user just for that other region
C
Use the --region parameter
D
You need to override the default region by using aws configure
No comments yet.