Amazon DVA-C02 Practice Exams
Last updated on Oct 22,2026- Exam Code: DVA-C02
- Exam Name: AWS Certified Developer - Associate
- Certification Provider: Amazon
- Latest update: Oct 22,2026
A company is creating an AWS Step Functions state machine to run a set of tests for an application.
The tests need to run when a specific AWS Cloud Formation stack is deployed.
Which combination of steps will meet these requirements? (Select TWO.)
- A . Create an AWS Lambda function to invoke the state machine.
- B . Create an Amazon EventBridge rule on the default bus that matches on a detail type of CloudFormation stack status change, a status of UPDATE_IN_PROGRESS, and the stack ID of the CloudFormation stack.
- C . Create a pipe in Amazon EventBridge Pipes that has a source of the default event bus. Set the
Lambda function as a target. Filter on a detail type of CloudFormation stack status change, a status of UPDATE_IN_PROGRESS, and the stack ID of the CloudFormation stack. - D . Create a pipe in Amazon EventBridge Pipes that has a source of the EventBridge rule. Set the state machine as a target.
- E . Add the state machine as a target of the EventBridge rule.
A, E
Explanation:
Requirement Summary:
Trigger an AWS Step Functions state machine (test execution)
Only when a specific AWS CloudFormation stack is deployed
Option A: Create a Lambda function to invoke the state machine
✅ Valid approach: Lambda can be used as an intermediary trigger for Step Functions using the SDK (e.g., StartExecution API).
Offers flexibility (custom filtering, additional logic).
Option B: Create EventBridge rule filtering on UPDATE_IN_PROGRESS
❌ Incorrect: UPDATE_IN_PROGRESS triggers before the stack is fully deployed.
You need to trigger after deployment, such as UPDATE_COMPLETE or CREATE_COMPLETE.
Option C: EventBridge Pipes with Lambda target filtering on UPDATE_IN_PROGRESS
❌ Incorrect for same reason as B (wrong timing).
Also, EventBridge Pipes are not necessary here if you’re using rules directly.
Option D: Pipe with EventBridge Rule as source and Step Functions as target
❌ Invalid setup: EventBridge Pipes use event sources, not rules, as input. This configuration is unsupported.
Option E: Add the state machine as a target of the EventBridge rule
✅ Direct and low-overhead approach.
EventBridge natively supports Step Functions as a target.
You can trigger the state machine without a Lambda if the filter matches (e.g., ResourceStatus = CREATE_COMPLETE, with the correct StackId).
Step Functions as EventBridge target:
https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-target-step-functions.html
EventBridge CloudFormation events:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-listing-event-
history.html
StartExecution API: https://docs.aws.amazon.com/step-
functions/latest/apireference/API_StartExecution.html
A developer is configuring an applications deployment environment in AWS CodePipeine. The application code is stored in a GitHub repository. The developer wants to ensure that the repository package’s unit tests run in the new deployment environment. The deployment has already set the pipeline’s source provider to GitHub and has specified the repository and branch to use in the deployment.
When combination of steps should the developer take next to meet these requirements with the least the LEAST overhead’ (Select TWO).
- A . Create an AWS CodeCommt project. Add the repository package’s build and test commands to the protects buildspec
- B . Create an AWS CodeBuid project. Add the repository package’s build and test commands to the projects buildspec
- C . Create an AWS CodeDeploy protect. Add the repository package’s build and test commands to the project’s buildspec
- D . Add an action to the source stage. Specify the newly created project as the action provider. Specify the build attract as the actions input artifact.
- E . Add a new stage to the pipeline alter the source stage. Add an action to the new stage. Speedy the newly created protect as the action provider. Specify the source artifact as the action’s input artifact.
B, E
Explanation:
This solution will ensure that the repository package’s unit tests run in the new deployment environment with the least overhead because it uses AWS CodeBuild to build and test the code in a fully managed service, and AWS CodePipeline to orchestrate the deployment stages and actions.
Option A is not optimal because it will use AWS CodeCommit instead of AWS CodeBuild, which is a source control service, not a build and test service.
Option C is not optimal because it will use AWS CodeDeploy instead of AWS CodeBuild, which is a deployment service, not a build and test service.
Option D is not optimal because it will add an action to the source stage instead of creating a new stage, which will not follow the best practice of separating different deployment phases.
Reference: AWS CodeBuild, AWS CodePipeline
A developer maintains an Amazon API Gateway REST API. Customers use the API through a frontend UI and Amazon Cognito authentication.
The developer has a new version of the API that contains new endpoints and backward-incompatible interface changes. The developer needs to provide beta access to other developers on the team without affecting customers.
Which solution will meet these requirements with the LEAST operational overhead?
- A . Define a development stage on the API Gateway API. Instruct the other developers to point the endpoints to the development stage.
- B . Define a new API Gateway API that points to the new API application code. Instruct the other developers to point the endpoints to the new API.
- C . Implement a query parameter in the API application code that determines which code version to call.
- D . Specify new API Gateway endpoints for the API endpoints that the developer wants to add.
A
Explanation:
Amazon API Gateway is a service that enables developers to create, publish, maintain, monitor, and secure APIs at any scale. The developer can define a development stage on the API Gateway API and instruct the other developers to point the endpoints to the development stage. This way, the developer can provide beta access to the new version of the API without affecting customers who use the production stage. This solution will meet the requirements with the least operational overhead.
Reference: [What Is Amazon API Gateway? – Amazon API Gateway]
[Set up a Stage in API Gateway – Amazon API Gateway]
An organization is using Amazon CloudFront to ensure that its users experience low-latency access to its web application. The organization has identified a need to encrypt all traffic between users and CloudFront, and all traffic between CloudFront and the web application.
How can these requirements be met? (Select TWO)
- A . Use AWS KMS t0 encrypt traffic between cloudFront and the web application.
- B . Set the Origin Protocol Policy to "HTTPS Only".
- C . Set the Origin’s HTTP Port to 443.
- D . Set the Viewer Protocol Policy to "HTTPS Only" or Redirect HTTP to HTTPS"
- E . Enable the CloudFront option Restrict Viewer Access.
B, D
Explanation:
This solution will meet the requirements by ensuring that all traffic between users and CloudFront, and all traffic between CloudFront and the web application, are encrypted using HTTPS protocol. The Origin Protocol Policy determines how CloudFront communicates with the origin server (the web application), and setting it to “HTTPS Only” will force CloudFront to use HTTPS for every request to the origin server. The Viewer Protocol Policy determines how CloudFront responds to HTTP or HTTPS requests from users, and setting it to “HTTPS Only” or “Redirect HTTP to HTTPS” will force CloudFront to use HTTPS for every response to users.
Option A is not optimal because it will use AWS KMS to encrypt traffic between CloudFront and the web application, which is not necessary or supported by CloudFront.
Option C is not optimal because it will set the origin’s HTTP port to 443, which is incorrect as port 443 is used for HTTPS protocol, not HTTP protocol.
Option E is not optimal because it will enable the CloudFront option Restrict Viewer Access, which is used for controlling access to private content using signed URLs or signed cookies, not for encrypting traffic.
Reference: [Using HTTPS with CloudFront], [Restricting Access to Amazon S3 Content by Using an Origin Access Identity]
A developer is building an application that uses AWS API Gateway APIs. AWS Lambda function, and AWS Dynamic DB tables. The developer uses the AWS Serverless Application Model (AWS SAM) to build and run serverless applications on AWS. Each time the developer pushes of changes for only to the Lambda functions, all the artifacts in the application are rebuilt.
The developer wants to implement AWS SAM Accelerate by running a command to only redeploy the Lambda functions that have changed.
Which command will meet these requirements?
- A . sam deploy -force-upload
- B . sam deploy -no-execute-changeset
- C . sam package
- D . sam sync -watch
D
Explanation:
The command that will meet the requirements is sam sync -watch. This command enables AWS SAM Accelerate mode, which allows the developer to only redeploy the Lambda functions that have changed. The -watch flag enables file watching, which automatically detects changes in the source code and triggers a redeployment. The other commands either do not enable AWS SAM Accelerate mode, or do not redeploy the Lambda functions automatically.
Reference: AWS SAM Accelerate
A developer is creating an application that must be able to generate API responses without backend integrations. Multiple internal teams need to work with the API while the application is still in development.
Which solution will meet these requirements with the LEAST operational overhead?
- A . Create an Amazon API Gateway REST API. Set up a proxy resource that has the HTTP proxy integration type.
- B . Create an Amazon API Gateway HTTP API. Provision a VPC link, and set up a private integration on the API to connect to a VPC.
- C . Create an Amazon API Gateway HTTP API. Enable mock integration on the method of the API resource.
- D . Create an Amazon API Gateway REST API. Enable mock integration on the method of the API resource.
D
Explanation:
Comprehensive Detailed and Lengthy Step-by-Step Explanation with All AWS Developer
Reference: 1. Understanding the Use Case:
The API needs to:
Generate responses without backend integrations: This indicates the use of mock responses for testing.
Be used by multiple internal teams during development. Minimize operational overhead.
A developer is implementing a serverless application by using AWS CloudFormation to provision Amazon S3 web hosting. Amazon API Gateway, and AWS Lambda functions. The Lambda function source code is zipped and uploaded to an S3 bucket. The S3 object key of the zipped source code is specified in the Lambda resource in the CloudFormation template.
The developer notices that there are no changes in the Lambda function every time the CloudFormation stack is updated.
How can the developer resolve this issue?
- A . Create a new Lambda function alias before updating the CloudFormation stack.
- B . Change the S3 object key or the S3 version in the CloudFormation template before updating the CloudFormation stack.
- C . Upload the zipped source code to another S3 bucket before updating the CloudFormation stack.
- D . Associate a code signing configuration with the Lambda function before updating the CloudFormation stack.
A company runs applications on Amazon EKS containers. The company sends application logs from the containers to an Amazon CloudWatch Logs log group. The company needs to process log data in real time based on a specific error in the application logs.
Which combination of steps will meet these requirements? (Select TWO.)
- A . Create an Amazon SNS topic that has a subscription filter policy.
- B . Create a subscription filter on the log group that has a filter pattern.
- C . Set up an Amazon CloudWatch agent operator to manage the trace collection daemon in Amazon EKS.
- D . Create an AWS Lambda function to process the logs.
- E . Create an Amazon EventBridge rule to invoke the AWS Lambda function on a schedule.
B, D
Explanation:
Requirement Summary:
EKS containers send logs to CloudWatch Logs
Need to process logs in real time
Trigger logic based on a specific error in logs
Evaluate Options:
Option A: SNS topic with filter policy
❌ SNS filter policies work on message attributes, not on CloudWatch Logs subscription filters Option B: Subscription filter on log group
✅ This enables real-time log processing
You can create a subscription filter with a pattern matching specific error strings Sends matched logs to a Lambda function or Kinesis Option C: CloudWatch agent operator for trace collection
❌ Irrelevant for log processing
Used for monitoring and tracing, not real-time log filtering Option D: Lambda function to process logs
✅ Once logs match the pattern, Lambda can process and act (e.g., alert, store, analyze) Option E: EventBridge rule on a schedule
❌ Not real-time
Scheduled EventBridge rules are for cron-like tasks, not log stream processing
Subscription filters:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html
Real-time log processing with Lambda:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#LambdaExample
Logs in EKS to CloudWatch: https://docs.aws.amazon.com/eks/latest/userguide/fargate-logging.html
A company has a website that displays a daily newsletter. When a user visits the website, an AWS Lambda function processes the browser’s request and queries the company’s on-premises database to obtain the current newsletter. The newsletters are stored in English. The Lambda function uses the Amazon Translate TranslateText API operation to translate the newsletters, and the translation is displayed to the user.
Due to an increase in popularity, the website’s response time has slowed. The database is overloaded. The company cannot change the database and needs a solution that improves the response time of the Lambda function.
Which solution meets these requirements?
- A . Change to asynchronous Lambda function invocation.
- B . Cache the translated newsletters in the Lambda /tmp directory.
- C . Enable TranslateText API caching.
- D . Change the Lambda function to use parallel processing.
A developer accesses AWS CodeCommit over SSH.
The SSH keys configured to access AWS CodeCommit are tied to a user with the following permissions:

The developer needs to create/delete branches
Which specific IAM permissions need to be added based on the principle of least privilege?

- A . Option A
- B . Option B
- C . Option C
- D . Option D
A
Explanation:
This solution allows the developer to create and delete branches in AWS CodeCommit by granting the codecommit:CreateBranch and codecommit:DeleteBranch permissions. These are the minimum permissions required for this task, following the principle of least privilege.
Option B grants too many permissions, such as codecommit:Put*, which allows the developer to create, update, or delete any resource in CodeCommit.
Option C grants too few permissions, such as codecommit:Update*, which does not allow the developer to create or delete branches.
Option D grants all permissions, such as
codecommit:*, which is not secure or recommended.
Reference: [AWS CodeCommit Permissions Reference], [Create a Branch (AWS CLI)]