Skip to main content

DVA-C02 Real Exam Questions

AWS Certified Developer - Associate (DVA-C02)

574 questions available · Page 1 of 58

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

A developer needs to freeze changes to an AWS CodeCommit repository before a production release. The developer will work on new features while a quality assurance (QA) team tests the release.

The QA testing and all bug fixes must take place in isolation from the main branch. After the release, the developer must integrate all bug fixes into the main branch.

Which solution will meet these requirements?

  1. A

    Create a release branch from the latest Git commit that will be in the release. Apply fixes to the release branch. Continue developing new features, and merge the features into the main branch. Merge the release branch into the main branch after the release.

  2. B

    Create a Git tag on the latest Git commit that will be in the release. Continue developing new features, and merge the features into the main branch. Apply fixes to the main branch. Update the Git tag for the release to be on the latest commit on the main branch.

  3. C

    Create a release branch from the latest Git commit that will be in the release. Apply fixes to the release branch. Continue developing new features, and merge the features into the main branch. Rebase the main branch onto the release branch after the release.

  4. D

    Create a Git tag on the latest Git commit that will be in the release. Continue developing new features, and merge the features into the main branch. Apply the Git commits for fixes to the Git tag for the release.

Show answer and explanation

Correct answer: A

Question 2 Single choice

The upload of a 15 GB object to Amazon S3 fails. The error message reads: "Your proposed upload exceeds the maximum allowed object size."

Which of following technique will allow the Developer to upload this object?

  1. A

    Upload the object to another AWS region

  2. B

    Upload the object using the multi-part upload API

  3. C

    Contact AWS Support to increase the object size limit

  4. D

    Upload the object over an AWS Direct Connect connection

Show answer and explanation

Correct answer: B

Question 3 Single choice

An ecommerce website uses an AWS Lambda function and an Amazon RDS for MySQL database for an order fulfillment service. The service needs to return order confirmation immediately.

During a marketing campaign that caused an increase in the number of orders, the website's operations team noticed errors for "too many connections" from Amazon RDS. However, the RDS DB cluster metrics are healthy. CPU and memory capacity are still available.

What should a developer do to resolve the errors?

  1. A

    Initialize the database connection outside the handler function. Increase the max_user_connections value on the parameter group of the DB cluster. Restart the DB cluster.

  2. B

    Initialize the database connection outside the handler function. Use RDS Proxy instead of connecting directly to the DB cluster.

  3. C

    Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that equals the number of available database connections.

  4. D

    Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that is less than the number of available database connections.

Show answer and explanation

Correct answer: B

Explanation

https://aws.amazon.com/blogs/compute/using-amazon-rds-proxy-with-aws-lambda/

Question 4 Single choice

A company is developing a serverless multi-tier application on AWS. The company will build the serverless logic tier by using Amazon API Gateway and AWS Lambda. While the company builds the logic tier, a developer who works on the frontend of the application must develop integration tests. The tests must cover both positive and negative scenarios, depending on success and error HTTP status codes.

Which solution will meet these requirements with the LEAST effort?

  1. A

    Set up a mock integration for API methods in API Gateway. In the integration request from Method Execution, add simple logic to return either a success or error based on HTTP status code. In the integration response, add messages that correspond to the HTTP status codes.

  2. B

    Create two mock integration resources for API methods in API Gateway. In the integration request, return a success HTTP status code for one resource and an error HTTP status code for the other resource. In the integration response, add messages that correspond to the HTTP status codes.

  3. C

    Create Lambda functions to perform tests. Add simple logic to return either success or error, based on the HTTP status codes. Build an API Gateway Lambda integration. Select appropriate Lambda functions that correspond to the HTTP status codes.

  4. D

    Create a Lambda function to perform tests. Add simple logic to return either success or error-based HTTP status codes. Create a mock integration in API Gateway. Select the Lambda function that corresponds to the HTTP status codes.

Show answer and explanation

Correct answer: A

Question 5 Single choice

A company hosts a client-side web application for one of its subsidiaries on Amazon S3. The web application can be accessed through Amazon CloudFront from https://www.example.com. After a successful rollout, the company wants to host three more client-side web applications for its remaining subsidiaries on three separate S3 buckets.

To achieve this goal, a developer moves all the common JavaScript files and web fonts to a central S3 bucket that serves the web applications. However, during testing, the developer notices that the browser blocks the JavaScript files and web fonts.

What should the developer do to prevent the browser from blocking the JavaScript files and web fonts?

  1. A

    Create four access points that allow access to the central S3 bucket. Assign an access point to each web application bucket.

  2. B

    Create a bucket policy that allows access to the central S3 bucket. Attach the bucket policy to the central S3 bucket.

  3. C

    Create a cross-origin resource sharing (CORS) configuration that allows access to the central S3 bucket. Add the CORS configuration to the central S3 bucket.

  4. D

    Create a Content-MD5 header that provides a message integrity check for the central S3 bucket. Insert the Content-MD5 header for each web application request.

Show answer and explanation

Correct answer: C

Explanation

https://docs.aws.amazon.com/AmazonS3/latest/userguide/cors.html

Using cross-origin resource sharing (CORS):
Cross-origin resource sharing (CORS) defines a way for client web applications that are loaded in one domain to interact with resources in a different domain.

Question 6 Single choice

A developer needs to use a code template to create an automated deployment of an application onto Amazon EC2 instances. The template must be configured to repeat deployment, installation, and updates of resources for the application.
The template must be able to create identical environments and roll back to previous versions.

Which solution will meet these requirements?

  1. A

    Use AWS Amplify for automatic deployment templates. Use a traffic-splitting deployment to copy any deployments. Modify any resources created by Amplify, if necessary.

  2. B

    Use AWS CodeBuild for automatic deployment. Upload the required AppSpec file template. Save the appspec.yml file in the root directory folder of the revision. Specify the deployment group that includes the EC2 instances for the deployment.

  3. C

    Use AWS CloudFormation to create an infrastructure template in JSON format to deploy the EC2 instances. Use CloudFormation helper scripts to install the necessary software and to start the application. Call the scripts directly from the template.

  4. D

    Use AWS AppSync to deploy the application. Upload the template as a GraphQL schema. Specify the EC2 instances for deployment of the application. Use resolvers as a version control mechanism and to make any updates to the deployments.

Show answer and explanation

Correct answer: C

Question 7 Multiple choice

A developer is deploying an application on Amazon EC2 instances that run in Account A. The application needs to read data from an existing Amazon Kinesis data stream in Account B.

Which actions should the developer take to provide the application with access to the stream? (Choose two.)

  1. A

    Update the instance profile role in Account A with stream read permissions.

  2. B

    Create an IAM role with stream read permissions in Account B.

  3. C

    Add a trust policy to the instance profile role and IAM role in Account B to allow the instance profile role to assume the IAM role.

  4. D

    Add a trust policy to the instance profile role and IAM role in Account B to allow reads from the stream.

  5. E

    Add a resource-based policy in Account B to allow read access from the instance profile role.

Show answer and explanation

Correct answers: B, C

Question 8 Multiple choice

An application that is deployed to Amazon EC2 is using Amazon DynamoDB. The application calls the DynamoDB REST API. Periodically, the application receives a ProvisionedThroughputExceededException error when the application writes to a DynamoDB table.

Which solutions will mitigate this error MOST cost-effectively? (Choose two.)

  1. A

    Modify the application code to perform exponential backoff when the error is received.

  2. B

    Modify the application to use the AWS SDKs for DynamoDB.

  3. C

    Increase the read and write throughput of the DynamoDB table.

  4. D

    Create a DynamoDB Accelerator (DAX) cluster for the DynamoDB table.

  5. E

    Create a second DynamoDB table. Distribute the reads and writes between the two tables.

Show answer and explanation

Correct answers: A, B

Question 9 Single choice

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?

  1. A

    "codecommit:CreateBranch"
    "codecommit:DeleteBranch"

  2. B

    "codecommit:Put*"

  3. C

    "codecommit:Update*"

  4. D

    "codecommit:*"

Show answer and explanation

Correct answer: A

Question 10 Single choice

A company has an ecommerce web application that uses an on-premises MySQL database as a data store. The company migrates the on-premises MySQL database to Amazon RDS for MySQL.

A developer needs to configure the application's access to the RDS for MySQL database. The developer's solution must not use long term credentials.

Which solution will meet these requirements?

  1. A

    Enable IAM database authentication on the RDS for MySQL DB instance. Create an IAM role that has the minimum required permissions. Assign the role to the application.

  2. B

    Store the MySQL credentials as secrets in AWS Secrets Manager. Create an IAM role that has the minimum required permissions to retrieve the secrets. Assign the role to the application.

  3. C

    Configure the MySQL credentials as environment variables that are available at runtime for the application.

  4. D

    Store the MySQL credentials as SecureString parameters in AWS Systems Manager Parameter Store.
    Create an IAM role that has the minimum required permissions to retrieve the parameters. Assign the role to the application.

Show answer and explanation

Correct answer: B