Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A company runs a batch processing job on Amazon ECS using Fargate. The job processes files from an S3 bucket and writes results to another S3 bucket. The job runs once per day and takes about 30 minutes. The company wants to reduce costs by stopping the ECS service when not in use. Which solution should the developer implement?

⚠ Common exam trap

It's easy for candidates to confuse ECS Service Auto Scaling with AWS Batch's job-based scaling; while ECS can scale to zero tasks, it does not automatically manage job completion and termination, leading to residual costs and complexity, whereas AWS Batch is designed for exactly this use case.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use AWS Batch with a Fargate launch type and schedule the job with Amazon EventBridge.

AWS Batch with a Fargate launch type is the ideal solution because it is purpose-built for batch processing jobs that run to completion. By scheduling the job with Amazon EventBridge, you can trigger the job once per day, and AWS Batch automatically provisions the Fargate compute environment only when the job runs, then scales down to zero after completion—eliminating costs during idle periods. This approach directly addresses the requirement to reduce costs by stopping the ECS service when not in use, without manual intervention.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use an AWS Lambda function to run the job and configure a scheduled event in Amazon EventBridge.

    Why it's wrong here

    AWS Lambda functions are designed for short-duration, event-driven compute tasks, making them unsuitable for longer batch processes. While Amazon EventBridge can reliably trigger Lambda on a schedule, Lambda has a hard execution duration limit of 15 minutes. A batch processing job requiring 30 minutes to complete would exceed this limit, causing the function to time out and fail. Therefore, Lambda is not a viable compute platform for this specific workload.

  • Use AWS Batch with a Fargate launch type and schedule the job with Amazon EventBridge.

    Why this is correct

    AWS Batch is specifically designed for running batch computing workloads, efficiently managing job queues, compute environments, and job execution. Utilizing the Fargate launch type eliminates the need to provision and manage EC2 instances, providing a serverless experience where resources are automatically provisioned and scaled down to zero when jobs are not running. Scheduling the job with Amazon EventBridge ensures reliable, time-based invocation of the batch process, making this a robust, serverless, and cost-effective solution for a 30-minute batch job.

  • Use Amazon ECS Service Auto Scaling to scale the service down to zero tasks when not in use.

    Why it's wrong here

    Amazon ECS Service Auto Scaling is designed to adjust the number of running tasks in an ECS service based on demand or a schedule. However, it has a fundamental limitation: it cannot scale the desired task count down to zero. The minimum desired count for an ECS service is always one, meaning at least one task would continuously run, incurring unnecessary costs when the batch job is not active. This makes it unsuitable for a cost-optimized, intermittent batch workload that needs to scale to zero.

  • Use an Amazon EC2 Auto Scaling group to launch an instance, run the job, and then terminate.

    Why it's wrong here

    While an Amazon EC2 Auto Scaling group can launch instances, run a job, and then terminate, this approach introduces significant operational overhead for a Fargate-based batch processing job. It requires managing EC2 instances, AMIs, and the lifecycle of the Auto Scaling group itself, which contradicts the serverless benefits of Fargate. Furthermore, the question explicitly mentions using Fargate, making an EC2-centric solution less appropriate and more complex than necessary for this specific requirement.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.