AWS Certified Developer – Associate (DVA-C02) — Question 201
A developer is working on an application that processes operating data from IoT devices. Each IoT device uploads a data file once every hour to an Amazon S3 bucket. The developer wants to immediately process each data file when the data file is uploaded to Amazon S3.
The developer will use an AWS Lambda function to process the data files from Amazon S3. The Lambda function is configured with the S3 bucket information where the files are uploaded. The developer wants to configure the Lambda function to immediately invoke after each data file is uploaded.
Which solution will meet these requirements?
Answer options
- A. Add an asynchronous invocation to the Lambda function. Select the S3 bucket as the source.
- B. Add an Amazon EventBridge event to the Lambda function. Select the S3 bucket as the source.
- C. Add a trigger to the Lambda function. Select the S3 bucket as the source.
- D. Add a layer to the Lambda function. Select the S3 bucket as the source.
Correct answer: C
Explanation
The correct answer is C because setting up a trigger for the Lambda function allows it to be invoked automatically whenever a new file is uploaded to the specified S3 bucket. Options A and B do not provide immediate invocation upon file upload, and option D is irrelevant as adding a layer does not trigger function execution.