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 213 discussion

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

A developer is automating a new application deployment with AWS Serverless Application Model (AWS SAM). The new application has one AWS Lambda function and one Amazon S3 bucket. The Lambda function must access the S3 bucket to only read objects.

How should the developer configure AWS SAM to grant the necessary read privilege to the S3 bucket?

  • A. Reference a second Lambda authorizer function.
  • B. Add a custom S3 bucket policy to the Lambda function.
  • C. Create an Amazon Simple Queue Service (SQS) topic for only S3 object reads Reference the topic in the template.
  • D. Add the S3ReadPolicy template to the Lambda function's execution role.
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
perfmon
1 year, 1 month ago
D. - This option involves attaching a predefined IAM policy template (S3ReadPolicy) to the IAM role associated with the Lambda function's execution environment. - IAM policies define permissions for actions within AWS services. The S3ReadPolicy template, as its name suggests, likely grants permissions related to reading objects from S3 buckets. - By adding this template to the Lambda function's execution role, you are granting the Lambda function the necessary permissions to read objects from S3 buckets specified in the policy. - This is a common practice when you want to ensure that your Lambda function has the appropriate permissions to interact with S3 without manually defining the permissions in detail.
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: D
D is correct because lambda needs to read files from S3 so we can use the S3ReadPolicy template
upvoted 1 times
...
may2021_r
2 years, 2 months ago
D. Add the S3ReadPolicy template to the Lambda function's execution role. In AWS SAM, the permissions for an AWS Lambda function can be managed through its execution role. To grant the necessary read privilege to the S3 bucket, the developer should add the S3ReadPolicy template to the Lambda function's execution role. The S3ReadPolicy template is an AWS managed policy that grants read-only access to an S3 bucket. It includes permissions to list the objects in the bucket and to read the objects themselves. By adding this policy to the Lambda function's execution role, the function will have the necessary permissions to access the S3 bucket to only read objects.
upvoted 1 times
...
Krt5894
2 years, 2 months ago
Selected Answer: D
Agreed D
upvoted 1 times
...
michaldavid
2 years, 5 months ago
Selected Answer: D
Lambda execution role is the answer
upvoted 1 times
...
k1kavi1
2 years, 5 months ago
Selected Answer: D
Agreed
upvoted 1 times
k1kavi1
2 years, 5 months ago
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-policy-template-list.html#s3-read-policy
upvoted 2 times
k1kavi1
2 years, 5 months ago
https://www.examtopics.com/discussions/amazon/view/69365-exam-aws-certified-developer-associate-topic-1-question-391/
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