AWS Certified Developer Associate · Free Practice Question Medium

Question 27

A serverless application uses an IAM role to authenticate and authorize access to an Amazon DynamoDB table. A Developer is troubleshooting access issues affecting the application. The Developer has access to the IAM role that the application is using.

Which of the following commands will help the Developer to test the role permissions using the AWS CLI?

  • A

    aws sts get-session-token

  • B

    aws sts assume-role

  • C

    aws iam get-role-policy

  • D

    aws dynamodb describe-endpoints

Reveal correct answer

Correct answer: B

Explanation

The AWS CLI “aws sts assume role” command will enable the Developer to assume the role and gain temporary security credentials. The Developer can then use those security credentials to troubleshoot access issues that are affecting the application.

CORRECT: "aws sts assume-role" is the correct answer.

INCORRECT: "aws sts get-session-token" is incorrect. This is used to get temporary credentials for an AWS account or IAM user. It can subsequently be used to call the assume-role API.

INCORRECT: "aws iam get-role-policy" is incorrect. This command retrieves the specified inline policy document that is embedded with the specified IAM role.

INCORRECT: "aws dynamodb describe-endpoints" is incorrect. This command returns the regional endpoint information.

References:

https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html

Save time with our AWS cheat sheets:

https://digitalcloud.training/amazon-dynamodb/

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need