exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 216 discussion

A developer is working on an AWS Lambda function that accesses Amazon DynamoDB. The Lambda function must retrieve an item and update some of its attributes, or create the item if it does not exist. The Lambda function has access to the primary key.

Which IAM permissions should the developer request for the Lambda function to achieve this functionality?

  • A. dynamodb:DeleleItem
    dynamodb:GetItem
    dynamodb:PutItem
  • B. dynamodb:UpdateItem
    dynamodb:GetItem
    dynamodb:DescribeTable
  • C. dynamodb:GetRecords
    dynamodb:PutItem
    dynamodb:UpdateTable
  • D. dynamodb:UpdateItem
    dynamodb:GetItem
    dynamodb:PutItem
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Claire_KMT
Highly Voted 12 months ago
D. dynamodb:UpdateItem, dynamodb:GetItem, and dynamodb:PutItem Here's why: dynamodb:GetItem: This permission allows the Lambda function to retrieve an item from DynamoDB. dynamodb:UpdateItem: This permission allows the Lambda function to update the attributes of an item in DynamoDB. dynamodb:PutItem: This permission allows the Lambda function to create a new item if it doesn't already exist in the DynamoDB table.
upvoted 8 times
...
65703c1
Most Recent 5 months ago
Selected Answer: D
D is the correct answer.
upvoted 2 times
...
Snape
9 months, 3 weeks ago
Selected Answer: D
D is correct
upvoted 2 times
...
rrshah83
9 months, 3 weeks ago
Selected Answer: B
x A: as delete is not required. Plus Put item is not required, update lets you create a new item if it doesn't already exist B: meets requirements. DescribeTable helps provide a list of attributes that can be used to update. x C: put not required; getrecords does not exist x D: put not required.
upvoted 1 times
...
TanTran04
10 months, 2 weeks ago
Selected Answer: D
UpdateItem: Edits an existing item's attributes https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html GetItem: retrieves attributes from the Thread table https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html#API_GetItem_Examples PutItem: Creates a new item, or replaces an old item with a new item. https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html
upvoted 2 times
...
didorins
12 months ago
Selected Answer: D
PutItem is to CREATE new item or replace old item with new item GetItem is to retrieve an item UpdateItem so to update the attributes Hence answer D
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago