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

A developer is building an event-driven application by using AWS Lambda and Amazon EventBridge. The Lambda function needs to push events to an EventBridge event bus. The developer uses an SDK to run the PutEvents EventBridge action and specifies no credentials in the code. After deploying the Lambda function, the developer notices that the function is failing and there are AccessDeniedException errors in the logs.

How should the developer resolve this issue?

  • A. Configure a VPC peering connection between the Lambda function and EventBridge.
  • B. Modify their AWS credentials to include permissions for the PutEvents EventBridge action.
  • C. Modify the Lambda function execution role to include permissions for the PutEvents EventBridge action.
  • D. Add a resource-based policy to the Lambda function to include permissions for the PutEvents EventBridge action.
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
examuserss
4 months ago
Selected Answer: C
Correct Answer: C. Modify the Lambda function execution role to include permissions for the PutEvents EventBridge action. The developer should update the Lambda function's execution role to include the necessary permissions for the PutEvents action on the EventBridge event bus. This will resolve the AccessDeniedException errors and allow the Lambda function to push events to EventBridge.
upvoted 1 times
...
65703c1
11 months ago
Selected Answer: C
C is the correct answer.
upvoted 1 times
...
be1dca8
1 year ago
C you use IAM roles on the sender event bus to give the sender event bus permission to send events to the receiver event bus. You use Resource-based policies on the receiver event bus to give the receiver event bus permission to receive events from the sender event bus. https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-bus-to-bus.html
upvoted 3 times
albert_kuo
9 months ago
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "events:PutEvents", "Resource": "*" } ] }
upvoted 1 times
...
...
DeaconStJohn
1 year, 1 month ago
Selected Answer: C
As lambda is initiating the action (push), permission must be attached the the execution role.
upvoted 2 times
...
outrageous7
1 year, 1 month ago
Selected Answer: C
Lambda Execution Role (IAM Role) • Grants the Lambda function permissions to AWS services / resources
upvoted 2 times
...
KarBiswa
1 year, 1 month ago
Selected Answer: D
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-perms.html
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