A developer built a Lambda function to process .csv files placed into an S3 bucket. Which combination of steps will trigger the Lambda function whenever a .csv file is uploaded to the bucket? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon EventBridge rule that matches S3 object-created events with a pattern., Add a trigger to the existing Lambda function of type EventBridge and select the EventBridge rule..
Why this is the answer
To trigger a Lambda function when a .csv file is uploaded to an S3 bucket, you need to configure an event source. Amazon S3 can publish events to Amazon EventBridge. Therefore, the first step is to create an EventBridge rule that specifically matches S3 object-created events. This rule should include a pattern to filter for objects ending with the .csv extension in the specified S3 bucket. Once the EventBridge rule is defined, you then add a trigger to your existing Lambda function. This trigger should be of type EventBridge, and you select the EventBridge rule you just created as its source. This establishes the connection, ensuring that whenever a .csv file is uploaded to the S3 bucket, EventBridge detects the S3 event, matches it with the rule, and invokes the Lambda function. Scheduling an EventBridge rule periodically or creating a separate Lambda function to scan the bucket are polling mechanisms, not event-driven, and would incur unnecessary costs and latency. S3 Lifecycle rules are for managing object storage classes or deletion, not for invoking Lambda functions.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed