A developer ran the AWS CLI command aws dynamodb get-item --table-name demoman-table --key '{"id": {"N":"1993"}}' after configuring the CLI with a specific IAM user's credentials. The command returned errors and no item was returned. What is the most likely reason for the failure?
Choose an answer
Tap an option to check your answer.
Correct answer: The IAM user does not have a policy granting read access to the demoman-table..
Why this is the answer
The most likely reason for the failure is that the IAM user lacks the necessary permissions. AWS services, including DynamoDB, enforce access control through IAM policies. If an IAM user attempts an action (like GetItem) without an attached policy explicitly granting that permission on the specified resource (demoman-table), the request will be denied, resulting in an error. Incorrect options: The command get-item is correct for retrieving an item, and the key format {"id": {"N":"1993"}} is also correct for a numeric primary key. put-item is for adding or updating items. Opening a support case is unnecessary; access control is managed via IAM policies, not by AWS support for routine access issues. DynamoDB can absolutely be accessed and managed through the AWS CLI; it's a primary interface for interacting with AWS services.
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