AWS Certified Developer – Associate (DVA-C02) — Question 231
A developer registered an AWS Lambda function as a target for an Application Load Balancer (ALB) using a CLI command. However, the Lambda function is not being invoked when the client sends requests through the ALB.
Why is the Lambda function not being invoked?
Answer options
- A. A Lambda function cannot be registered as a target for an ALB.
- B. A Lambda function can be registered with an ALB using AWS Management Console only.
- C. The permissions to invoke the Lambda function are missing.
- D. Cross-zone is not enabled on the ALB.
Correct answer: C
Explanation
The correct answer is C because missing permissions will prevent the ALB from invoking the Lambda function. Option A is incorrect as AWS does allow Lambda functions as ALB targets. Option B is false because Lambda functions can be registered with an ALB through both CLI and the AWS Management Console. Option D is irrelevant to the invocation of the Lambda function.