DOP-C02 exam dumps

DOP-C02 practice question 272 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 272

Single answer

Your company is building a serverless application to process images uploaded to an S3 bucket. The workflow requires that as soon as an image is uploaded to the bucket, metadata about the image is extracted using a Lambda function, and a notification about the processing result is sent to a downstream system. You need to implement an event-driven architecture for this workflow using AWS services. How should you design the solution?

  1. A

    Configure an S3 Event Notification to invoke the Lambda function whenever a new object is created in the bucket. After processing, the Lambda function publishes the result to an SNS topic.

  2. B

    Use Amazon EventBridge to schedule an event every minute that checks for new objects in the S3 bucket and triggers a Lambda function to process the images. The Lambda function then publishes the result to an SNS topic.

  3. C

    Configure an S3 Event Notification to send a message to an SQS queue whenever a new object is created. A Lambda function is triggered to poll the SQS queue, process the image, and publish the result to an SNS topic.

  4. D

    Use AWS Step Functions to poll the S3 bucket for new objects and invoke a Lambda function to process the images. After processing, the Lambda function publishes the result to an SNS topic.

Show answer and explanation

Correct answer: A

Explanation

The most efficient way to implement an event-driven architecture for this scenario is to use S3 Event Notifications to invoke a Lambda function directly when a new object is created in the S3 bucket. The Lambda function can then process the image and publish the result to an SNS topic. This approach minimizes complexity and leverages native AWS integration capabilities.

  • A. Correct.

    This is the correct answer. S3 Event Notifications can directly invoke a Lambda function when a specified event occurs, such as an object creation. The Lambda function processes the image and can then publish the result to an SNS topic, fulfilling the requirements of the scenario.

  • B. Incorrect.

    This is incorrect. EventBridge is not used to poll S3 for new objects. EventBridge is designed for routing events from various AWS services, but S3 has native Event Notification capabilities that are more suitable for this use case.

  • C. Incorrect.

    This is incorrect. While using S3 Event Notifications with SQS is valid, it introduces unnecessary complexity for this scenario. Direct invocation of Lambda from S3 Event Notifications is simpler and more efficient.

  • D. Incorrect.

    This is incorrect. Step Functions are not required for this use case as the workflow is simple and can be handled using S3 Event Notifications and Lambda. Step Functions are better suited for orchestrating complex workflows.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam