DVA-C02 practice question 17 of 35
A developer is trying get data from an Amazon DynamoDB table called demoman-table. The developer configured the AWS CLI to use a specific IAM use's credentials and ran the following command. The command returned errors and no rows were returned. What is the MOST likely cause of these issues?
Full set: 598 questionsDomain Troubleshooting and Optimization
All requests to AWS services, including those made from the AWS CLI, must be authenticated and authorized. The CLI uses the credentials of a configured IAM principal (in this case, an IAM user). For the request to succeed, this user must have an attached IAM policy that grants the necessary permissions for the intended action. To get data from a DynamoDB table, the policy must allow read actions (such as dynamodb:GetItem, dynamodb:Query, or dynamodb:Scan) on the specific table resource (demoman-table). An error indicates the API call failed, and a permissions issue is the most common cause for such failures.
A. The put-item command is for writing or updating data in a table, whereas the developer's goal is to get data.
B. Access control for AWS resources is self-service and managed through IAM policies; it does not require intervention from AWS Support.
C. Amazon DynamoDB is fully supported by the AWS CLI, which provides commands for all data plane and control plane operations.
1. AWS DynamoDB Developer Guide: Under "Identity and Access Management for Amazon DynamoDB," the section "Using identity-based policies (IAM policies) for Amazon DynamoDB" states, "To provide access, add permissions to your users, groups, or roles... When you add a permissions policy to a user or group of users, it allows or denies them permission to perform the specified tasks on the specified resources." This confirms that an IAM policy is required for access.
2. AWS IAM User Guide: The "Policies and permissions in IAM" section explains the core concept: "IAM identities (users, groups, and roles) start with no permissions... To grant a user permission to perform an action, you attach a policy to the user." This establishes the "deny by default" principle that makes option D the most likely cause.
3. AWS CLI Command Reference - dynamodb: The documentation lists numerous commands for interacting with DynamoDB, including get-item, query, and scan for reading data, and put-item for writing data. This directly refutes options A and C. (See aws dynamodb help).
Keep practicing
Take the free DVA-C02 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DVA-C02 practice questions
- Question 1A company has a multi-node Windows legacy application that runs on premises. The applicat…
- Question 2A developer migrated a legacy application to an AWS Lambda function. The function uses a …
- Question 3A development learn has an Amazon API Gateway REST API that is backed by an AWS Lambda fu…
- Question 4A company is expanding the compatibility of its photo-snaring mobile app to hundreds of a…
- Question 5A company has an ecommerce application. To track product reviews, the company's developme…
- Question 6A social media company is designing a platform that allows users to upload data, which is…
