AWS Certified Developer – Associate / Question #877 of 557

Question #877

A developer built a containerized application that processes images stored in Amazon S3, generates thumbnails, and saves them back to S3. The application runs efficiently with low CPU and memory usage. The developer wants to deploy this application on Amazon ECS to run the processing task every night at midnight. Which solution will meet these requirements with the LEAST amount of infrastructure management overhead?

A

Use an Amazon EC2 launch type with Auto Scaling groups to handle nightly tasks.

B

Deploy the application on an Amazon EC2 instance configured with a cron job.

C

Define a task definition using AWS Fargate and schedule it with Amazon EventBridge.

D

Create an Amazon ECS cluster with managed instance provisioning for nightly workloads.

Explanation

Option C is correct because:
- AWS Fargate is a serverless compute engine for containers, removing the need to provision/manage EC2 instances (reducing infrastructure management).
- Amazon EventBridge can trigger the Fargate task nightly using a cron schedule, ensuring the task runs only when needed.

Why other options are incorrect:
- A (EC2 + Auto Scaling): Requires managing EC2 instances and scaling policies, which is unnecessary for a nightly task.
- B (EC2 + cron): Involves manual EC2 management (patching, availability), increasing overhead.
- D (ECS cluster with managed instances): Still requires managing the underlying EC2 infrastructure.

Key Points: Use Fargate for serverless container tasks and EventBridge for scheduling to minimize management effort.

Answer

The correct answer is: C