Free Amazon DVA-C02 Exam Actual Questions

The questions for DVA-C02 were last updated On Dec 14, 2025

At ValidExamDumps, we consistently monitor updates to the Amazon DVA-C02 exam questions by Amazon. Whenever our team identifies changes in the exam questions,exam objectives, exam focus areas or in exam requirements, We immediately update our exam questions for both PDF and online practice exams. This commitment ensures our customers always have access to the most current and accurate questions. By preparing with these actual questions, our customers can successfully pass the Amazon AWS Certified Developer - Associate exam on their first attempt without needing additional materials or study guides.

Other certification materials providers often include outdated or removed questions by Amazon in their Amazon DVA-C02 exam. These outdated questions lead to customers failing their Amazon AWS Certified Developer - Associate exam. In contrast, we ensure our questions bank includes only precise and up-to-date questions, guaranteeing their presence in your actual exam. Our main priority is your success in the Amazon DVA-C02 exam, not profiting from selling obsolete exam questions in PDF or Online Practice Test.

 

Question No. 1

A developer is migrating a containerized application from an on-premises environment to an Amazon ECS cluster.

In the on-premises environment, the container uses a Docker file to store the application. Service dependency configurations such as databases, caches, and storage volumes are stored in a docker-compose.yml file.

Both files are located at the top level of the code base that the developer needs to containerize. When the developer deploys the code to Amazon ECS, the instructions from the Docker file are carried out. However, none of the configurations from docker-compose.yml are applied.

The developer needs to resolve the error and ensure the configurations are applied.

Show Answer Hide Answer
Correct Answer: B

Why Option B is Correct:

Amazon ECS does not natively process docker-compose.yml files. Instead, the configurations from docker-compose.yml must be converted into ECS-compatible configurations within a task definition. Task definitions are the primary way to specify container configurations in ECS, including service dependencies like databases, caches, and volumes.

Steps to Resolve the Error:

Extract the configurations from the docker-compose.yml file.

Map the dependencies and settings to the appropriate ECS task definition fields.

Deploy the task definition to the ECS cluster.

Why Other Options are Incorrect:

Option A: Docker labels do not directly impact ECS task execution or integrate with ECS service configurations.

Option C: ECS namespaces do not exist as a feature.

Option D: Changing the service type to REPLICA does not resolve the issue of missing service dependency configurations.

AWS Documentation Reference:

Amazon ECS Task Definitions

Migrating Docker Compose Workloads to ECS


Question No. 2

A developer is using AWS Step Functions to automate a workflow The workflow defines each step as an AWS Lambda function task The developer notices that runs of the Step Functions state machine fail in the GetResource task with either an UlegalArgumentException error or a TooManyRequestsException error

The developer wants the state machine to stop running when the state machine encounters an UlegalArgumentException error. The state machine needs to retry the GetResource task one additional time after 10 seconds if the state machine encounters a TooManyRequestsException error. If the second attempt fails, the developer wants the state machine to stop running.

How can the developer implement the Lambda retry functionality without adding unnecessary complexity to the state machine'?

Show Answer Hide Answer
Correct Answer: C

Step Functions Retriers: Retriers provide a built-in way to gracefully handle transient errors within State Machines. Here's how to use them:

Directly attach a retrier to the problematic 'GetResource' task.

Configure the retrier:

ErrorEquals:Set this to ['TooManyRequestsException'] to target the specific error.

IntervalSeconds:Set to 10 for the desired retry delay.

MaxAttempts:Set to 1, as you want only one retry attempt.

Error Handling:

Upon 'TooManyRequestsException', the retrier triggers the task again after 10 seconds.

On a second failure, Step Functions moves to the next state or fails the workflow, as per your design.

'IllegalArgumentException' causes error propagation as intended.


Error Handling in Step Functions:https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

Question No. 3

An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2 instances are taking a long time to become available during scale-out events. The UserData script is taking a long time to run.

The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.

Which combination of steps should the developer take to meet these requirements? (Choose two.)

Show Answer Hide Answer
Correct Answer: B, E

AWS CloudFormation is a service that enables developers to model and provision AWS resources using templates. The developer can use the following steps to avoid accidental database deletion in the future:

Set up AWS CodeDeploy to deploy the most recent version of the application at runtime. This will ensure that the application code is always up to date and does not depend on the AMI.

Remove any commands that perform operating system patching from the UserData script. This will reduce the time that the UserData script takes to run and speed up the instance launch process.


[What Is AWS CloudFormation? - AWS CloudFormation]

[What Is AWS CodeDeploy? - AWS CodeDeploy]

[Running Commands on Your Linux Instance at Launch - Amazon Elastic Compute Cloud]

Question No. 4

A developer is creating a new REST API by using Amazon API Gateway and AWS Lambd

a. The development team tests the API and validates responses for the known use cases before deploying the API to the production environment.

The developer wants to make the REST API available for testing by using API Gateway locally.

Which AWS Serverless Application Model Command Line Interface (AWS SAM CLI) subcommand will meet these requirements?

Show Answer Hide Answer
Question No. 5

A developer built an application that calls an external API to obtain data, processes the data, and saves the result to Amazon S3. The developer built a container image with all of the necessary dependencies to run the application as a container.

The application runs locally and requires minimal CPU and RAM resources. The developer has created an Amazon ECS cluster. The developer needs to run the application hourly in Amazon ECS.

Which solution will meet these requirements with the LEAST amount of infrastructure management overhead?

Show Answer Hide Answer
Correct Answer: C

Requirement Summary:

Containerized app

Runs hourly

Minimal CPU and RAM

Goal: Least infrastructure management

Evaluate Options:

A . Add a capacity provider to manage instances

Capacity providers are used for managing EC2-backed ECS clusters, which still require underlying EC2 management.

B . Add an Amazon EC2 instance

Involves managing infrastructure (provisioning, patching, scaling, etc.)

C . Use AWS Fargate launch type

Serverless container runtime

No server management

Easily scheduled using EventBridge + ECS Fargate Task

Best fit for periodic workloads like this

D . Use managed node groups

Applies to EKS (Kubernetes), not ECS

Unnecessary overhead for this use case

Fargate: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/what-is-fargate.html

Scheduled ECS tasks: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduled_tasks.html