AWS Certified Developer – Associate — Question 47

A developer is using Amazon S3 as the event source that invokes a Lambda function when new objects are created in the bucket. The event source mapping information is stored in the bucket notification configuration. The developer is working with different versions of the Lambda function, and has a constant need to update notification configuration so that Amazon S3 invokes the correct version.
What is the MOST efficient and effective way to achieve mapping between the S3 event and Lambda?

Answer options

Correct answer: C

Explanation

The correct answer is C, as using a Lambda alias allows the developer to create stable references to specific versions of the Lambda function, making it easier to manage version updates without changing the S3 notification configuration. The other options do not provide a direct or efficient way to handle versioning in this context, as different triggers, environment variables, and tags do not solve the problem of linking a specific version to the S3 event.