🔍

DVA-C02 — questions

Page 2 of 28 · 557 total questions.

Topic 1 · Question 21

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?

  • ADefine a development stage on the API Gateway API. Instruct the other developers to point the endpoints to the development stage. (correct answer)
  • BDefine 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.
  • CImplement a query parameter in the API application code that determines which code version to call.
  • DSpecify new API Gateway endpoints for the API endpoints that the developer wants to add.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Define a development stage on the API Gateway API. Instruct the other developers to point the endpoints to the development stage.

Explanation

Amazon API Gateway is a fully managed front door for creating and securing APIs at scale.

Topic 1 · Question 22

A developer is creating an application that will store personal health information (PHI). The PHI needs to be encrypted at all times. An encrypted Amazon RDS for MySQL DB instance is storing the data. The developer wants to increase the performance of the application by caching frequently accessed data while adding the ability to sort or rank the cached datasets. Which solution will meet these requirements?

  • ACreate an Amazon ElastiCache for Redis instance. Enable encryption of data in transit and at rest. Store frequently accessed data in the cache. (correct answer)
  • BCreate an Amazon ElastiCache for Memcached instance. Enable encryption of data in transit and at rest. Store frequently accessed data in the cache.
  • CCreate an Amazon RDS for MySQL read replica. Connect to the read replica by using SSL. Configure the read replica to store frequently accessed data.
  • DCreate an Amazon DynamoDB table and a DynamoDB Accelerator (DAX) cluster for the table. Store frequently accessed data in the DynamoDB table.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create an Amazon ElastiCache for Redis instance. Enable encryption of data in transit and at rest. Store frequently accessed data in the cache.

Explanation

Amazon ElastiCache provides in-memory caching (Redis/Memcached) to reduce latency and offload the database.

Topic 1 · Question 23

A company has a multi-node Windows legacy application that runs on premises. The application uses a network shared folder as a centralized configuration repository to store configuration files in .xml format. The company is migrating the application to Amazon EC2 instances. As part of the migration to AWS, a developer must identify a solution that provides high availability for the repository. Which solution will meet this requirement MOST cost-effectively?

  • AMount an Amazon Elastic Block Store (Amazon EBS) volume onto one of the EC2 instances. Deploy a file system on the EBS volume. Use the host operating system to share a folder. Update the application code to read and write configuration files from the shared folder.
  • BDeploy a micro EC2 instance with an instance store volume. Use the host operating system to share a folder. Update the application code to read and write configuration files from the shared folder.
  • CCreate an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Update the application code to use the AWS SDK to read and write configuration files from Amazon S3. (correct answer)
  • DCreate an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Mount the S3 bucket to the EC2 instances as a local volume. Update the application code to read and write configuration files from the disk.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create an Amazon S3 bucket to host the repository. Migrate the existing.xml files to the S3 bucket. Update the application code to use the AWS SDK to read and write configuration files from Amazon S3.

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed. AWS Config tracks resource configuration changes and evaluates compliance. This option delivers the requirement at the lowest cost.

Topic 1 · Question 24

A company wants to deploy and maintain static websites on AWS. Each website's source code is hosted in one of several version control systems, including AWS CodeCommit, Bitbucket, and GitHub. The company wants to implement phased releases by using development, staging, user acceptance testing, and production environments in the AWS Cloud. Deployments to each environment must be started by code merges on the relevant Git branch. The company wants to use HTTPS for all data exchange. The company needs a solution that does not require servers to run continuously. Which solution will meet these requirements with the LEAST operational overhead?

  • AHost each website by using AWS Amplify with a serverless backend. Conned the repository branches that correspond to each of the desired environments. Start deployments by merging code changes to a desired branch. (correct answer)
  • BHost each website in AWS Elastic Beanstalk with multiple environments. Use the EB CLI to link each repository branch. Integrate AWS CodePipeline to automate deployments from version control code merges.
  • CHost each website in different Amazon S3 buckets for each environment. Configure AWS CodePipeline to pull source code from version control. Add an AWS CodeBuild stage to copy source code to Amazon S3.
  • DHost each website on its own Amazon EC2 instance. Write a custom deployment script to bundle each website's static assets. Copy the assets to Amazon EC2. Set up a workflow to run the script when code is merged.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Host each website by using AWS Amplify with a serverless backend. Conned the repository branches that correspond to each of the desired environments. Start deployments by merging code changes to a desired branch.

Explanation

Amazon EBS provides block storage attached to a single EC2 instance.

Topic 1 · Question 25

A company is migrating an on-premises database to Amazon RDS for MySQL. The company has read-heavy workloads. The company wants to refactor the code to achieve optimum read performance for queries. Which solution will meet this requirement with LEAST current and future effort?

  • AUse a multi-AZ Amazon RDS deployment. Increase the number of connections that the code makes to the database or increase the connection pool size if a connection pool is in use.
  • BUse a multi-AZ Amazon RDS deployment. Modify the code so that queries access the secondary RDS instance.
  • CDeploy Amazon RDS with one or more read replicas. Modify the application code so that queries use the URL for the read replicas. (correct answer)
  • DUse open source replication software to create a copy of the MySQL database on an Amazon EC2 instance. Modify the application code so that queries use the IP address of the EC2 instance.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Deploy Amazon RDS with one or more read replicas. Modify the application code so that queries use the URL for the read replicas.

Explanation

Amazon RDS is a managed relational database that handles patching, backups and failover.

Topic 1 · Question 26

A developer is creating an application that will be deployed on IoT devices. The application will send data to a RESTful API that is deployed as an AWS Lambda function. The application will assign each API request a unique identifier. The volume of API requests from the application can randomly increase at any given time of day. During periods of request throttling, the application might need to retry requests. The API must be able to handle duplicate requests without inconsistencies or data loss. Which solution will meet these requirements?

  • ACreate an Amazon RDS for MySQL DB instance. Store the unique identifier for each request in a database table. Modify the Lambda function to check the table for the identifier before processing the request.
  • BCreate an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to check the table for the identifier before processing the request. (correct answer)
  • CCreate an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to return a client error response when the function receives a duplicate request.
  • DCreate an Amazon ElastiCache for Memcached instance. Store the unique identifier for each request in the cache. Modify the Lambda function to check the cache for the identifier before processing the request.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to check the table for the identifier before processing the request.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 1 · Question 27

A developer wants to expand an application to run in multiple AWS Regions. The developer wants to copy Amazon Machine Images (AMIs) with the latest changes and create a new application stack in the destination Region. According to company requirements, all AMIs must be encrypted in all Regions. However, not all the AMIs that the company uses are encrypted. How can the developer expand the application to run in the destination Region while meeting the encryption requirement?

  • ACreate new AMIs, and specify encryption parameters. Copy the encrypted AMIs to the destination Region. Delete the unencrypted AMIs. (correct answer)
  • BUse AWS Key Management Service (AWS KMS) to enable encryption on the unencrypted AMIs. Copy the encrypted AMIs to the destination Region.
  • CUse AWS Certificate Manager (ACM) to enable encryption on the unencrypted AMIs. Copy the encrypted AMIs to the destination Region.
  • DCopy the unencrypted AMIs to the destination Region. Enable encryption by default in the destination Region.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create new AMIs, and specify encryption parameters. Copy the encrypted AMIs to the destination Region. Delete the unencrypted AMIs.

Topic 1 · Question 28

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?

  • ACreate four access points that allow access to the central S3 bucket. Assign an access point to each web application bucket.
  • BCreate a bucket policy that allows access to the central S3 bucket. Attach the bucket policy to the central S3 bucket
  • CCreate a cross-origin resource sharing (CORS) configuration that allows access to the central S3 bucket. Add the CORS configuration to the central S3 bucket. (correct answer)
  • DCreate 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.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed. AWS Config tracks resource configuration changes and evaluates compliance.

Topic 1 · Question 29 · Select all that apply

An application is processing clickstream data using Amazon Kinesis. The clickstream data feed into Kinesis experiences periodic spikes. The PutRecords API call occasionally fails and the logs show that the failed call returns the response shown below: Which techniques will help mitigate this exception? (Choose two.)

Exhibit 1 for question 29
  • AImplement retries with exponential backoff. (correct answer)
  • BUse a PutRecord API instead of PutRecords.
  • CReduce the frequency and/or size of the requests. (correct answer)
  • DUse Amazon SNS instead of Kinesis.
  • EReduce the number of KCL consumers.
Reveal answer & explanation
Correct answer: A, C

The correct answer is A, C. Option A: Implement retries with exponential backoff. Option C: Reduce the frequency and/or size of the requests. This option decouples the components so they scale independently and absorb load spikes.

Topic 1 · Question 30

A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in. What is the MOST operationally efficient solution that meets this requirement?

  • ACreate an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon API Gateway API to invoke the function. Call the API from the client side when login confirmation is received.
  • BCreate an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function. (correct answer)
  • CCreate an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Create an Amazon CloudWatch Logs log subscription filter to invoke the function based on the login status.
  • DConfigure Amazon Cognito to stream all logs to Amazon Kinesis Data Firehose. Create an AWS Lambda function to process the streamed logs and to send the email notification based on the login status of each user.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon Cognito manages user sign-up, sign-in and federated identity for applications.

Topic 1 · Question 31

A developer has an application that stores data in an Amazon S3 bucket. The application uses an HTTP API to store and retrieve objects. When the PutObject API operation adds objects to the S3 bucket the developer must encrypt these objects at rest by using server-side encryption with Amazon S3 managed keys (SSE-S3). Which solution will meet this requirement?

  • ACreate an AWS Key Management Service (AWS KMS) key. Assign the KMS key to the S3 bucket.
  • BSet the x-amz-server-side-encryption header when invoking the PutObject API operation. (correct answer)
  • CProvide the encryption key in the HTTP header of every request.
  • DApply TLS to encrypt the traffic to the S3 bucket.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Set the x-amz-server-side-encryption header when invoking the PutObject API operation.

Topic 1 · Question 32

A developer needs to perform geographic load testing of an API. The developer must deploy resources to multiple AWS Regions to support the load testing of the API. How can the developer meet these requirements without additional application code?

  • ACreate and deploy an AWS Lambda function in each desired Region. Configure the Lambda function to create a stack from an AWS CloudFormation template in that Region when the function is invoked.
  • BCreate an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions. (correct answer)
  • CCreate an AWS Systems Manager document that defines the resources. Use the document to create the resources in the desired Regions.
  • DCreate an AWS CloudFormation template that defines the load test resources. Use the AWS CLI deploy command to create a stack from the template in each Region.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.

Explanation

AWS CloudFormation provisions infrastructure as code repeatably. This option needs the least custom development effort.

Topic 1 · Question 33

A developer is creating an application that includes an Amazon API Gateway REST API in the us-east-2 Region. The developer wants to use Amazon CloudFront and a custom domain name for the API. The developer has acquired an SSL/TLS certificate for the domain from a third-party provider. How should the developer configure the custom domain for the application?

  • AImport the SSL/TLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS A record for the custom domain.
  • BImport the SSL/TLS certificate into CloudFront. Create a DNS CNAME record for the custom domain.
  • CImport the SSL/TLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS CNAME record for the custom domain.
  • DImport the SSL/TLS certificate into AWS Certificate Manager (ACM) in the us-east-1 Region. Create a DNS CNAME record for the custom domain. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Import the SSL/TLS certificate into AWS Certificate Manager (ACM) in the us-east-1 Region. Create a DNS CNAME record for the custom domain.

Explanation

AWS Certificate Manager provisions and renews TLS certificates automatically.

Topic 1 · Question 34

A developer is creating a template that uses AWS CloudFormation to deploy an application. The application is serverless and uses Amazon API Gateway, Amazon DynamoDB, and AWS Lambda. Which AWS service or tool should the developer use to define serverless resources in YAML?

  • ACloudFormation serverless intrinsic functions
  • BAWS Elastic Beanstalk
  • CAWS Serverless Application Model (AWS SAM) (correct answer)
  • DAWS Cloud Development Kit (AWS CDK)
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: AWS Serverless Application Model (AWS SAM).

Topic 1 · Question 35

A developer wants to insert a record into an Amazon DynamoDB table as soon as a new file is added to an Amazon S3 bucket. Which set of steps would be necessary to achieve this?

  • ACreate an event with Amazon EventBridge that will monitor the S3 bucket and then insert the records into DynamoDB.
  • BConfigure an S3 event to invoke an AWS Lambda function that inserts records into DynamoDB. (correct answer)
  • CCreate an AWS Lambda function that will poll the S3 bucket and then insert the records into DynamoDB.
  • DCreate a cron job that will run at a scheduled time and insert the records into DynamoDB.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure an S3 event to invoke an AWS Lambda function that inserts records into DynamoDB.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon S3 provides durable, scalable object storage that is fully managed. Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 1 · Question 36 · Select all that apply

A development team maintains a web application by using a single AWS CloudFormation template. The template defines web servers and an Amazon RDS database. The team uses the Cloud Formation template to deploy the Cloud Formation stack to different environments. During a recent application deployment, a developer caused the primary development database to be dropped and recreated. The result of this incident was a loss of data. The team needs to avoid accidental database deletion in the future. Which solutions will meet these requirements? (Choose two.)

  • AAdd a CloudFormation Deletion Policy attribute with the Retain value to the database resource. (correct answer)
  • BUpdate the CloudFormation stack policy to prevent updates to the database. (correct answer)
  • CModify the database to use a Multi-AZ deployment.
  • DCreate a CloudFormation stack set for the web application and database deployments.
  • EAdd a Cloud Formation DeletionPolicy attribute with the Retain value to the stack.
Reveal answer & explanation
Correct answer: A, B

The correct answer is A, B. Option A: Add a CloudFormation Deletion Policy attribute with the Retain value to the database resource. Option B: Update the CloudFormation stack policy to prevent updates to the database.

Explanation

AWS CloudFormation provisions infrastructure as code repeatably.

Topic 1 · Question 37

A company has an Amazon S3 bucket that contains sensitive data. The data must be encrypted in transit and at rest. The company encrypts the data in the S3 bucket by using an AWS Key Management Service (AWS KMS) key. A developer needs to grant several other AWS accounts the permission to use the S3 GetObject operation to retrieve the data from the S3 bucket. How can the developer enforce that all requests to retrieve the data provide encryption in transit?

  • ADefine a resource-based policy on the S3 bucket to deny access when a request meets the condition “aws:SecureTransport”: “false”. (correct answer)
  • BDefine a resource-based policy on the S3 bucket to allow access when a request meets the condition “aws:SecureTransport”: “false”.
  • CDefine a role-based policy on the other accounts' roles to deny access when a request meets the condition of “aws:SecureTransport”: “false”.
  • DDefine a resource-based policy on the KMS key to deny access when a request meets the condition of “aws:SecureTransport”: “false”.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Define a resource-based policy on the S3 bucket to deny access when a request meets the condition “aws:SecureTransport”: “false”.

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed.

Topic 1 · Question 38

An application that is hosted on an Amazon EC2 instance needs access to files that are stored in an Amazon S3 bucket. The application lists the objects that are stored in the S3 bucket and displays a table to the user. During testing, a developer discovers that the application does not show any objects in the list. What is the MOST secure way to resolve this issue?

  • AUpdate the IAM instance profile that is attached to the EC2 instance to include the S3:* permission for the S3 bucket.
  • BUpdate the IAM instance profile that is attached to the EC2 instance to include the S3:ListBucket permission for the S3 bucket. (correct answer)
  • CUpdate the developer's user permissions to include the S3:ListBucket permission for the S3 bucket.
  • DUpdate the S3 bucket policy by including the S3:ListBucket permission and by setting the Principal element to specify the account number of the EC2 instance.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Update the IAM instance profile that is attached to the EC2 instance to include the S3:ListBucket permission for the S3 bucket.

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system. Amazon S3 provides durable, scalable object storage that is fully managed. AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies.

Topic 1 · Question 39

A company is planning to securely manage one-time fixed license keys in AWS. The company's development team needs to access the license keys in automaton scripts that run in Amazon EC2 instances and in AWS CloudFormation stacks. Which solution will meet these requirements MOST cost-effectively?

  • AAmazon S3 with encrypted files prefixed with “config”
  • BAWS Secrets Manager secrets with a tag that is named SecretString
  • CAWS Systems Manager Parameter Store SecureString parameters (correct answer)
  • DCloudFormation NoEcho parameters
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: AWS Systems Manager Parameter Store SecureString parameters

Explanation

Systems Manager Parameter Store securely stores configuration data and secrets. AWS Systems Manager operates and automates management of fleets of resources. This option delivers the requirement at the lowest cost.

Topic 1 · Question 40

A company has deployed infrastructure on AWS. A development team wants to create an AWS Lambda function that will retrieve data from an Amazon Aurora database. The Amazon Aurora database is in a private subnet in company's VPC. The VPC is named VPC1. The data is relational in nature. The Lambda function needs to access the data securely. Which solution will meet these requirements?

  • ACreate the Lambda function. Configure VPC1 access for the function. Attach a security group named SG1 to both the Lambda function and the database. Configure the security group inbound and outbound rules to allow TCP traffic on Port 3306. (correct answer)
  • BCreate and launch a Lambda function in a new public subnet that is in a new VPC named VPC2. Create a peering connection between VPC1 and VPC2.
  • CCreate the Lambda function. Configure VPC1 access for the function. Assign a security group named SG1 to the Lambda function. Assign a second security group named SG2 to the database. Add an inbound rule to SG1 to allow TCP traffic from Port 3306.
  • DExport the data from the Aurora database to Amazon S3. Create and launch a Lambda function in VPC1. Configure the Lambda function query the data from Amazon S3.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create the Lambda function. Configure VPC1 access for the function. Attach a security group named SG1 to both the Lambda function and the database. Configure the security group inbound and outbound rules to allow TCP...

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS Config tracks resource configuration changes and evaluates compliance.

Showing questions 2140 of 557 · Page 2 of 28