AWS Certified Data Engineer Associate · Free Practice Question Medium

Question 20

A company is building a serverless image processing application. They want to trigger an AWS Lambda function automatically whenever a new image is uploaded to a specific Amazon S3 bucket. The Lambda function will process the image and store the result back into the S3 bucket. How should the company configure the S3 bucket to trigger the Lambda function?

  • A

    Use S3 Event Notifications to trigger the Lambda function when an s3:ObjectCreated event occurs.

  • B

    Attach an S3 bucket policy to invoke the Lambda function on object creation.

  • C

    Set up an S3 bucket lifecycle rule to invoke the Lambda function on object upload.

  • D

    Enable versioning on the S3 bucket to automatically trigger Lambda upon object creation.

Reveal correct answer

Correct answer: A

A.

To trigger a Lambda function based on an event like s3:ObjectCreated, S3 Event Notifications can be configured to invoke the Lambda function when a new object is added to the bucket.

B.

S3 bucket policies control access but do not trigger Lambda functions based on events.

C.

Lifecycle rules are used to transition objects between storage classes or delete objects; they cannot invoke Lambda functions.

D.

Enabling versioning helps maintain object versions but does not trigger Lambda functions on object creation.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need