exam questions

Exam AWS Certified Developer Associate All Questions

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

Exam AWS Certified Developer Associate topic 1 question 16 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 16
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is writing an AWS Lambda function. The Lambda function needs to access items that are stored in an Amazon DynamoDB table.
What is the MOST secure way to configure this access for the Lambda function?

  • A. Create an IAM user that has permissions to access the DynamoDB table. Create an access key for this user. Store the access key ID and secret access key in the Lambda function environment variables.
  • B. Add a resource-based policy to the DynamoDB table to allow access from the Lambda function's IAM role.
  • C. Create an IAM policy that allows access to the DynamoDB table. Attach this policy to the Lambda function's IAM role.
  • D. Create a DynamoDB Accelerator (DAX) cluster. Configure the Lambda function to use the DAX duster to access the DynamoDB table.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
sumanshu
4 months, 1 week ago
Selected Answer: C
A) Eliminated: Storing access keys in environment variables is not a best practice D) Eliminated: DAX can improve performance by acting as a caching layer for DynamoDB, it is not related to security or access configuration
upvoted 1 times
sumanshu
4 months, 1 week ago
C) Correct - IAM Role ensures that access to DynamoDB is managed securely and without the need to store sensitive credentials.
upvoted 1 times
sumanshu
4 months, 1 week ago
B) Eliminated - Resource based policy not needed
upvoted 1 times
...
...
...
jeanpierregs21
5 months, 2 weeks ago
It seems that DynamoDB now supports resource-based policies https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/security_iam_service-with-iam.html
upvoted 2 times
...
wxento1112
5 months, 2 weeks ago
DynamoDB now supports resource based policy. So B should be the correct answer NOW!
upvoted 1 times
...
thucta96dn
5 months, 4 weeks ago
Dynamo DB do not have resource policy. So C is correct answer
upvoted 1 times
...
gilleep_17
1 year, 3 months ago
answer c .... not B because - it doesnot supports resource-based policies-
upvoted 1 times
...
AsmaZoheb
1 year, 3 months ago
Selected Answer: C
for sure C
upvoted 1 times
...
ja1092m
1 year, 7 months ago
Selected Answer: C
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/security_iam_service-with-iam.html Dynamodb doesn't support resource based policies, so c it is
upvoted 2 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: C
C is correct we can use the lambda Role (or create a new one according to the company policies), attach the IAM policy (json with read and write permissions to the table) to this Role. Finally, the lambda function should have the access to the table.
upvoted 1 times
...
Krt5894
2 years, 2 months ago
Selected Answer: C
C. https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_lambda-access-dynamodb.html
upvoted 1 times
...
Dirisme
2 years, 3 months ago
Selected Answer: B
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_dynamodb_specific-table.html
upvoted 1 times
Jay1299
2 years, 2 months ago
Only Identity based policies can be used for DynamoDB
upvoted 2 times
...
...
dark_cherrymon
2 years, 5 months ago
Selected Answer: C
was going for B until i read the comment that dynamo db doesn't support role
upvoted 2 times
...
cloud_collector
2 years, 5 months ago
Selected Answer: C
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_lambda-access-dynamodb.html
upvoted 3 times
...
scomperleur
2 years, 6 months ago
Answer is C
upvoted 3 times
...
habros
2 years, 6 months ago
C. Straightforward
upvoted 1 times
...
gary_gary
2 years, 7 months ago
What is the difference between B and C?
upvoted 1 times
SuperPiski
2 years, 7 months ago
https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html - Identity-based policies are attached to an IAM user, group, or role. - Resource-based policies are attached to a resource. In this case you are using a role, so identity based policies should be used.
upvoted 3 times
...
Jabol
2 years, 7 months ago
Resource-based policy is not supported for DynamoDb - https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html#database_svcs
upvoted 7 times
...
...
sidvic
2 years, 7 months ago
Selected Answer: C
C. Using Role is the must secure way
upvoted 1 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