SAA-C03 Question 144
Select 2A developer is designing a serverless application where an image uploaded to an S3 bucket needs to be processed and resized. The image processing must be triggered automatically when a new file is uploaded, and the solution should not require the management of server infrastructure. Which combination of services and features should the developer use to achieve this?
- A
Amazon S3 event notifications to trigger an AWS Lambda function
- B
AWS Lambda to process and resize the image
- C
Amazon EC2 Auto Scaling to scale instances for processing the image
- D
AWS Fargate to run containerized image processing tasks
- E
Amazon S3 lifecycle policies to automatically resize images after upload
Show answer and explanation
Correct answers: A, B
Explanation
The combination of Amazon S3 event notifications and AWS Lambda is ideal for this serverless use case. S3 event notifications allow triggering a Lambda function when an image is uploaded to the bucket. Lambda can then handle image processing and resizing in a fully serverless manner, meeting the requirement to avoid managing infrastructure. The other options either involve server management or do not align with the use case.
- A. Correct.
Amazon S3 event notifications can trigger an AWS Lambda function when an object is created in the S3 bucket, making it the appropriate choice for this scenario.
- B. Correct.
AWS Lambda is a fully serverless compute service that can be used to process and resize images without managing servers, matching the requirements of the scenario.
- C. Incorrect.
Amazon EC2 Auto Scaling is not a serverless solution and requires managing server instances, which does not align with the requirements of this scenario.
- D. Incorrect.
AWS Fargate is a serverless compute engine for containers, but it is not the best fit for real-time event-driven workflows like S3 object uploads.
- E. Incorrect.
Amazon S3 lifecycle policies are used for managing object lifecycle (e.g., transitioning storage classes, deleting objects) but cannot be used to resize images.