While troubleshooting an application's permissions to modify an Amazon RDS database, a developer has the IAM role used by the application. Which AWS CLI command structure should the developer use to test what the role can assume?
Choose an answer
Tap an option to check your answer.
Correct answer: aws sts assume-role.
Why this is the answer
The aws sts assume-role command is used to obtain temporary security credentials for an IAM role. This allows the developer to test the permissions associated with that specific role by temporarily acting as that role. By assuming the role, the developer can then attempt to perform the actions that the application is failing to do, thereby directly troubleshooting the permissions. aws iam attach-role-policy is incorrect because it modifies the role's permissions rather than testing them. aws ssm resume-session is used for resuming an AWS Systems Manager session, which is unrelated to testing IAM role permissions. aws rds add-role-to-db-cluster associates an IAM role with an RDS DB cluster, but doesn't allow for testing the role's ability to assume or perform actions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed