🔍

DVA-C02 — questions

Page 11 of 28 · 557 total questions.

Topic 1 · Question 201

A company has an application that stores data in Amazon RDS instances. The application periodically experiences surges of high traffic that cause performance problems. During periods of peak traffic, a developer notices a reduction in query speed in all database queries. The team’s technical lead determines that a multi-threaded and scalable caching solution should be used to offload the heavy read traffic. The solution needs to improve performance. Which solution will meet these requirements with the LEAST complexity?

  • AUse Amazon ElastiCache for Memcached to offload read requests from the main database. (correct answer)
  • BReplicate the data to Amazon DynamoDSet up a DynamoDB Accelerator (DAX) cluster.
  • CConfigure the Amazon RDS instances to use Multi-AZ deployment with one standby instance. Offload read requests from the main database to the standby instance.
  • DUse Amazon ElastiCache for Redis to offload read requests from the main database.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Amazon ElastiCache for Memcached to offload read requests from the main database.

Explanation

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

Topic 1 · Question 202

A developer must provide an API key to an AWS Lambda function to authenticate with a third-party system. The Lambda function will run on a schedule. The developer needs to ensure that the API key remains encrypted at rest. Which solution will meet these requirements?

  • AStore the API key as a Lambda environment variable by using an AWS Key Management Service (AWS KMS) customer managed key. (correct answer)
  • BConfigure the application to prompt the user to provide the password to the Lambda function on the first run.
  • CStore the API key as a value in the application code.
  • DUse Lambda@Edge and only communicate over the HTTPS protocol.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Store the API key as a Lambda environment variable by using an AWS Key Management Service (AWS KMS) customer managed key.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS KMS manages encryption keys and integrates with most AWS services for encryption at rest.

Topic 1 · Question 203

An IT department uses Amazon S3 to store sensitive images. After more than 1 year, the company moves the images into archival storage. The company rarely accesses the images, but the company wants a storage solution that maximizes resiliency. The IT department needs access to the images that have been moved to archival storage within 24 hours. Which solution will meet these requirements MOST cost-effectively?

  • AUse S3 Standard-Infrequent Access (S3 Standard-IA) to store the images. Use S3 Glacier Deep Archive with standard retrieval to store and retrieve archived images. (correct answer)
  • BUse S3 Standard-Infrequent Access (S3 Standard-IA) to store the images. Use S3 Glacier Deep Archive with bulk retrieval to store and retrieve archived images.
  • CUse S3 Intelligent-Tiering to store the images. Use S3 Glacier Deep Archive with standard retrieval to store and retrieve archived images.
  • DUse S3 One Zone-Infrequent Access (S3 One Zone-IA) to store the images. Use S3 Glacier Deep Archive with bulk retrieval to store and retrieve archived images.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use S3 Standard-Infrequent Access (S3 Standard-IA) to store the images. Use S3 Glacier Deep Archive with standard retrieval to store and retrieve archived images.

Explanation

S3 Glacier Deep Archive is the lowest-cost storage for long-term archival with retrieval in hours. Amazon S3 Glacier offers low-cost archival storage for infrequently accessed data. S3 Standard-IA reduces cost for infrequently accessed data that still needs high availability. This option delivers the requirement at the lowest cost.

Topic 1 · Question 204

A developer is building a serverless application by using the AWS Serverless Application Model (AWS SAM). The developer is currently testing the application in a development environment. When the application is nearly finished, the developer will need to set up additional testing and staging environments for a quality assurance team. The developer wants to use a feature of the AWS SAM to set up deployments to multiple environments. Which solution will meet these requirements with the LEAST development effort?

  • AAdd a configuration file in TOML format to group configuration entries to every environment. Add a table for each testing and staging environment. Deploy updates to the environments by using the sam deploy command and the --config-env flag that corresponds to each environment. (correct answer)
  • BCreate additional AWS SAM templates for each testing and staging environment. Write a custom shell script that uses the sam deploy command and the --template-file flag to deploy updates to the environments.
  • CCreate one AWS SAM configuration file that has default parameters. Perform updates to the testing and staging environments by using the --parameter-overrides flag in the AWS SAM CLI and the parameters that the updates will override.
  • DUse the existing AWS SAM template. Add additional parameters to configure specific attributes for the serverless function and database table resources that are in each environment. Deploy updates to the testing and staging environments by using the sam deploy command.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add a configuration file in TOML format to group configuration entries to every environment. Add a table for each testing and staging environment. Deploy updates to the environments by using the sam deploy command and...

Explanation

AWS Config tracks resource configuration changes and evaluates compliance. This option needs the least custom development effort.

Topic 1 · Question 205

A developer is working on an application that processes operating data from IoT devices. Each IoT device uploads a data file once every hour to an Amazon S3 bucket. The developer wants to immediately process each data file when the data file is uploaded to Amazon S3. The developer will use an AWS Lambda function to process the data files from Amazon S3. The Lambda function is configured with the S3 bucket information where the files are uploaded. The developer wants to configure the Lambda function to immediately invoke after each data file is uploaded. Which solution will meet these requirements?

  • AAdd an asynchronous invocation to the Lambda function. Select the S3 bucket as the source.
  • BAdd an Amazon EventBridge event to the Lambda function. Select the S3 bucket as the source.
  • CAdd a trigger to the Lambda function. Select the S3 bucket as the source. (correct answer)
  • DAdd a layer to the Lambda function. Select the S3 bucket as the source.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Add a trigger to the Lambda function. Select the S3 bucket as the source.

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.

Topic 1 · Question 206

A developer is setting up infrastructure by using AWS CloudFormation. If an error occurs when the resources described in the Cloud Formation template are provisioned, successfully provisioned resources must be preserved. The developer must provision and update the CloudFormation stack by using the AWS CLI. Which solution will meet these requirements?

  • AAdd an --enable-termination-protection command line option to the create-stack command and the update-stack command.
  • BAdd a --disable-rollback command line option to the create-stack command and the update-stack command. (correct answer)
  • CAdd a --parameters ParameterKey=PreserveResources,ParameterValue=True command line option to the create-stack command and the update-stack command.
  • DAdd a --tags Key=PreserveResources,Value=True command line option to the create-stack command and the update-stack command.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Add a --disable-rollback command line option to the create-stack command and the update-stack command.

Topic 1 · Question 207

A developer is building a serverless application that connects to an Amazon Aurora PostgreSQL database. The serverless application consists of hundreds of AWS Lambda functions. During every Lambda function scale out, a new database connection is made that increases database resource consumption. The developer needs to decrease the number of connections made to the database. The solution must not impact the scalability of the Lambda functions. Which solution will meet these requirements?

  • AConfigure provisioned concurrency for each Lambda function by setting the ProvisionedConcurrentExecutions parameter to 10.
  • BEnable cluster cache management for Aurora PostgreSQL. Change the connection string of each Lambda function to point to cluster cache management.
  • CUse Amazon RDS Proxy to create a connection pool to manage the database connections. Change the connection string of each Lambda function to reference the proxy. (correct answer)
  • DConfigure reserved concurrency for each Lambda function by setting the ReservedConcurrentExecutions parameter to 10.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Amazon RDS Proxy to create a connection pool to manage the database connections. Change the connection string of each Lambda function to reference the proxy.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon RDS Proxy pools and shares database connections to improve scalability and resilience. Amazon RDS is a managed relational database that handles patching, backups and failover.

Topic 1 · Question 208

A developer is preparing to begin development of a new version of an application. The previous version of the application is deployed in a production environment. The developer needs to deploy fixes and updates to the current version during the development of the new version of the application. The code for the new version of the application is stored in AWS CodeCommit. Which solution will meet these requirements?

  • AFrom the main branch, create a feature branch for production bug fixes. Create a second feature branch from the main branch for development of the new version. (correct answer)
  • BCreate a Git tag of the code that is currently deployed in production. Create a Git tag for the development of the new version. Push the two tags to the CodeCommit repository.
  • CFrom the main branch, create a branch of the code that is currently deployed in production. Apply an IAM policy that ensures no other users can push or merge to the branch.
  • DCreate a new CodeCommit repository for development of the new version of the application. Create a Git tag for the development of the new version.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: From the main branch, create a feature branch for production bug fixes. Create a second feature branch from the main branch for development of the new version.

Topic 1 · Question 209

A developer is creating an AWS CloudFormation stack. The stack contains IAM resources with custom names. When the developer tries to deploy the stack, they receive an InsufficientCapabilities error. What should the developer do to resolve this issue?

  • ASpecify the CAPABILITY_AUTO_EXPAND capability in the CloudFormation stack.
  • BUse an administrators role to deploy IAM resources with CloudFormation.
  • CSpecify the CAPABILITY_IAM capability in the CloudFormation stack.
  • DSpecify the CAPABILITY_NAMED_IAM capability in the CloudFormation stack. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Specify the CAPABILITY_NAMED_IAM capability in the CloudFormation stack.

Explanation

AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies. AWS CloudFormation provisions infrastructure as code repeatably.

Topic 1 · Question 210

A company uses Amazon API Gateway to expose a set of APIs to customers. The APIs have caching enabled in API Gateway. Customers need a way to invalidate the cache for each API when they test the API. What should a developer do to give customers the ability to invalidate the API cache?

  • AAsk the customers to use AWS credentials to call the InvalidateCache API operation.
  • BAttach an InvalidateCache policy to the IAM execution role that the customers use to invoke the API. Ask the customers to send a request that contains the Cache-Control:max-age=0 HTTP header when they make an API call. (correct answer)
  • CAsk the customers to use the AWS SDK API Gateway class to invoke the InvalidateCache API operation.
  • DAttach an InvalidateCache policy to the IAM execution role that the customers use to invoke the API. Ask the customers to add the INVALIDATE_CACHE query string parameter when they make an API call.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Attach an InvalidateCache policy to the IAM execution role that the customers use to invoke the API. Ask the customers to send a request that contains the Cache-Control:max-age=0 HTTP header when they make an API call.

Explanation

AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies.

Topic 1 · Question 211

A developer is creating an AWS Lambda function that will generate and export a file. The function requires 100 MB of temporary storage for temporary files while running. These files will not be needed after the function is complete. How can the developer MOST efficiently handle the temporary files?

  • AStore the files in Amazon Elastic Block Store (Amazon EBS) and delete the files at the end of the Lambda function.
  • BCopy the files to Amazon Elastic File System (Amazon EFS) and delete the files at the end of the Lambda function.
  • CStore the files in the /tmp directory and delete the files at the end of the Lambda function. (correct answer)
  • DCopy the files to an Amazon S3 bucket with a lifecycle policy to delete the files.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Store the files in the /tmp directory and delete the files at the end of the Lambda function.

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead.

Topic 1 · Question 212

A company uses Amazon DynamoDB as a data store for its order management system. The company frontend application stores orders in a DynamoDB table. The DynamoDB table is configured to send change events to a DynamoDB stream. The company uses an AWS Lambda function to log and process the incoming orders based on data from the DynamoDB stream. An operational review reveals that the order quantity of incoming orders is sometimes set to 0. A developer needs to create a dashboard that will show how many unique customers this problem affects each day. What should the developer do to implement the dashboard?

  • AGrant the Lambda function’s execution role permissions to upload logs to Amazon CloudWatch Logs. Implement a CloudWatch Logs Insights query that selects the number of unique customers for orders with order quantity equal to 0 and groups the results in 1-day periods. Add the CloudWatch Logs Insights query to a CloudWatch dashboard. (correct answer)
  • BUse Amazon Athena to query AWS CloudTrail API logs for API calls. Implement an Athena query that selects the number of unique customers for orders with order quantity equal to 0 and groups the results in 1-day periods. Add the Athena query to an Amazon CloudWatch dashboard.
  • CConfigure the Lambda function to send events to Amazon EventBridge. Create an EventBridge rule that groups the number of unique customers for orders with order quantity equal to 0 in 1-day periods. Add a CloudWatch dashboard as the target of the rule.
  • DTurn on custom Amazon CloudWatch metrics for the DynamoDB stream of the DynamoDB table. Create a CloudWatch alarm that groups the number of unique customers for orders with order quantity equal to 0 in 1-day periods. Add the CloudWatch alarm to a CloudWatch dashboard.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Grant the Lambda function’s execution role permissions to upload logs to Amazon CloudWatch Logs. Implement a CloudWatch Logs Insights query that selects the number of unique customers for orders with order quantity eq...

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. Amazon CloudWatch collects metrics, logs and alarms to monitor and react to operational health.

Topic 1 · Question 213 · Select all that apply

A developer needs to troubleshoot an AWS Lambda function in a development environment. The Lambda function is configured in VPC mode and needs to connect to an existing Amazon RDS for SQL Server DB instance. The DB instance is deployed in a private subnet and accepts connections by using port 1433. When the developer tests the function, the function reports an error when it tries to connect to the database. Which combination of steps should the developer take to diagnose this issue? (Choose two.)

  • ACheck that the function’s security group has outbound access on port 1433 to the DB instance’s security group. Check that the DB instance’s security group has inbound access on port 1433 from the function’s security group. (correct answer)
  • BCheck that the function’s security group has inbound access on port 1433 from the DB instance’s security group. Check that the DB instance’s security group has outbound access on port 1433 to the function’s security group.
  • CCheck that the VPC is set up for a NAT gateway. Check that the DB instance has the public access option turned on.
  • DCheck that the function’s execution role permissions include rds:DescribeDBInstances, rds:ModifyDBInstance. and rds:DescribeDBSecurityGroups for the DB instance.
  • ECheck that the function’s execution role permissions include ec2:CreateNetworkInterface, ec2:DescribeNetworkInterfaces, and ec2:DeleteNetworkInterface. (correct answer)
Reveal answer & explanation
Correct answer: A, E

The correct answer is A, E. Option A: Check that the function’s security group has outbound access on port 1433 to the DB instance’s security group. Check that the DB instance’s security group has inbound access on port 1433 from the function’s security g... Option E: Check that the function’s execution role permissions include ec2:CreateNetworkInterface, ec2:DescribeNetworkInterfaces, and ec2:DeleteNetworkInterface.

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system.

Topic 1 · Question 214

A developer needs to launch a new Amazon EC2 instance by using the AWS CLI. Which AWS CLI command should the developer use to meet this requirement?

  • Aaws ec2 bundle-instance
  • Baws ec2 start-instances
  • Caws ec2 confirm-product-instance
  • Daws ec2 run-instances (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: aws ec2 run-instances

Explanation

Amazon EC2 provides resizable virtual servers when you need full control of the operating system.

Topic 1 · Question 215

A developer needs to manage AWS infrastructure as code and must be able to deploy multiple identical copies of the infrastructure, stage changes, and revert to previous versions. Which approach addresses these requirements?

  • AUse cost allocation reports and AWS OpsWorks to deploy and manage the infrastructure.
  • BUse Amazon CloudWatch metrics and alerts along with resource tagging to deploy and manage the infrastructure.
  • CUse AWS Elastic Beanstalk and AWS CodeCommit to deploy and manage the infrastructure.
  • DUse AWS CloudFormation and AWS CodeCommit to deploy and manage the infrastructure. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use AWS CloudFormation and AWS CodeCommit to deploy and manage the infrastructure.

Explanation

AWS CloudFormation provisions infrastructure as code repeatably. AWS CodeCommit hosts private Git repositories.

Topic 1 · Question 216

A developer is working on an AWS Lambda function that accesses Amazon DynamoDB. The Lambda function must retrieve an item and update some of its attributes, or create the item if it does not exist. The Lambda function has access to the primary key. Which IAM permissions should the developer request for the Lambda function to achieve this functionality?

  • Adynamodb:DeleleItem dynamodb:GetItem dynamodb:PutItem
  • Bdynamodb:UpdateItem dynamodb:GetItem dynamodb:DescribeTable
  • Cdynamodb:GetRecords dynamodb:PutItem dynamodb:UpdateTable
  • Ddynamodb:UpdateItem dynamodb:GetItem dynamodb:PutItem (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: dynamodb:UpdateItem dynamodb:GetItem dynamodb:PutItem

Explanation

Amazon DynamoDB is a fully managed, serverless NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 1 · Question 217

A developer has built a market application that stores pricing data in Amazon DynamoDB with Amazon ElastiCache in front. The prices of items in the market change frequently. Sellers have begun complaining that, after they update the price of an item, the price does not actually change in the product listing. What could be causing this issue?

  • AThe cache is not being invalidated when the price of the item is changed. (correct answer)
  • BThe price of the item is being retrieved using a write-through ElastiCache cluster.
  • CThe DynamoDB table was provisioned with insufficient read capacity.
  • DThe DynamoDB table was provisioned with insufficient write capacity.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: The cache is not being invalidated when the price of the item is changed.

Topic 1 · Question 218

A company requires that all applications running on Amazon EC2 use IAM roles to gain access to AWS services. A developer is modifying an application that currently relies on IAM user access keys stored in environment variables to access Amazon DynamoDB tables using boto, the AWS SDK for Python. The developer associated a role with the same permissions as the IAM user to the EC2 instance, then deleted the IAM user. When the application was restarted, the AWS AccessDeniedException messages started appearing in the application logs. The developer was able to use their personal account on the server to run DynamoDB API commands using the AWS CLI. What is the MOST likely cause of the exception?

  • AIAM policies might take a few minutes to propagate to resources.
  • BDisabled environment variable credentials are still being used by the application. (correct answer)
  • CThe AWS SDK does not support credentials obtained using an instance role.
  • DThe instance’s security group does not allow access to http://169.254.169.254.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Disabled environment variable credentials are still being used by the application.

Topic 1 · Question 219

A company has an existing application that has hardcoded database credentials. A developer needs to modify the existing application. The application is deployed in two AWS Regions with an active-passive failover configuration to meet company’s disaster recovery strategy. The developer needs a solution to store the credentials outside the code. The solution must comply with the company’s disaster recovery strategy. Which solution will meet these requirements in the MOST secure way?

  • AStore the credentials in AWS Secrets Manager in the primary Region. Enable secret replication to the secondary Region. Update the application to use the Amazon Resource Name (ARN) based on the Region. (correct answer)
  • BStore credentials in AWS Systems Manager Parameter Store in the primary Region. Enable parameter replication to the secondary Region. Update the application to use the Amazon Resource Name (ARN) based on the Region.
  • CStore credentials in a config file. Upload the config file to an S3 bucket in the primary Region. Enable Cross-Region Replication (CRR) to an S3 bucket in the secondary region. Update the application to access the config file from the S3 bucket, based on the Region.
  • DStore credentials in a config file. Upload the config file to an Amazon Elastic File System (Amazon EFS) file system. Update the application to use the Amazon EFS file system Regional endpoints to access the config file in the primary and secondary Regions.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Store the credentials in AWS Secrets Manager in the primary Region. Enable secret replication to the secondary Region. Update the application to use the Amazon Resource Name (ARN) based on the Region.

Explanation

AWS Secrets Manager stores and automatically rotates secrets such as database credentials. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 · Question 220

A developer is receiving HTTP 400: ThrottlingException errors intermittently when calling the Amazon CloudWatch API. When a call fails, no data is retrieved. What best practice should first be applied to address this issue?

  • AContact AWS Support for a limit increase.
  • BUse the AWS CLI to get the metrics.
  • CAnalyze the applications and remove the API call.
  • DRetry the call with exponential backoff. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Retry the call with exponential backoff.

Showing questions 201220 of 557 · Page 11 of 28