πŸ”

DVA-C02 β€” questions

Page 10 of 28 Β· 557 total questions.

Topic 1 Β· Question 181

A developer is troubleshooting an Amazon API Gateway API. Clients are receiving HTTP 400 response errors when the clients try to access an endpoint of the API. How can the developer determine the cause of these errors?

  • ACreate an Amazon Kinesis Data Firehose delivery stream to receive API call logs from API Gateway. Configure Amazon CloudWatch Logs as the delivery stream’s destination.
  • BTurn on AWS CloudTrail Insights and create a trail. Specify the Amazon Resource Name (ARN) of the trail for the stage of the API.
  • CTurn on AWS X-Ray for the API stage. Create an Amazon CloudWatch Logs log group. Specify the Amazon Resource Name (ARN) of the log group for the API stage.
  • DTurn on execution logging and access logging in Amazon CloudWatch Logs for the API stage. Create a CloudWatch Logs log group. Specify the Amazon Resource Name (ARN) of the log group for the API stage. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Turn on execution logging and access logging in Amazon CloudWatch Logs for the API stage. Create a CloudWatch Logs log group. Specify the Amazon Resource Name (ARN) of the log group for the API stage.

Explanation

Amazon CloudWatch collects metrics, logs and alarms to monitor and react to operational health.

Topic 1 Β· Question 182

A company developed an API application on AWS by using Amazon CloudFront, Amazon API Gateway, and AWS Lambda. The API has a minimum of four requests every second. A developer notices that many API users run the same query by using the POST method. The developer wants to cache the POST request to optimize the API resources. Which solution will meet these requirements?

  • AConfigure the CloudFront cache. Update the application to return cached content based upon the default request headers.
  • BOverride the cache method in the selected stage of API Gateway. Select the POST method. (correct answer)
  • CSave the latest request response in Lambda /tmp directory. Update the Lambda function to check the /tmp directory.
  • DSave the latest request in AWS Systems Manager Parameter Store. Modify the Lambda function to take the latest request response from Parameter Store.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Override the cache method in the selected stage of API Gateway. Select the POST method.

Explanation

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

Topic 1 Β· Question 183 Β· Select all that apply

A company is building a microservices application that consists of many AWS Lambda functions. The development team wants to use AWS Serverless Application Model (AWS SAM) templates to automatically test the Lambda functions. The development team plans to test a small percentage of traffic that is directed to new updates before the team commits to a full deployment of the application. Which combination of steps will meet these requirements in the MOST operationally efficient way? (Choose two.)

  • AUse AWS SAM CLI commands in AWS CodeDeploy to invoke the Lambda functions to test the deployment.
  • BDeclare the EventInvokeConfig on the Lambda functions in the AWS SAM templates with OnSuccess and OnFailure configurations.
  • CEnable gradual deployments through AWS SAM templates. (correct answer)
  • DSet the deployment preference type to Canary10Percent30Minutes. Use hooks to test the deployment. (correct answer)
  • ESet the deployment preference type to Linear10PercentEvery10Minutes. Use hooks to test the deployment.
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: Enable gradual deployments through AWS SAM templates. Option D: Set the deployment preference type to Canary10Percent30Minutes. Use hooks to test the deployment.

Topic 1 Β· Question 184

A company is using AWS CloudFormation to deploy a two-tier application. The application will use Amazon RDS as its backend database. The company wants a solution that will randomly generate the database password during deployment. The solution also must automatically rotate the database password without requiring changes to the application. What is the MOST operationally efficient solution that meets these requirements?

  • AUse an AWS Lambda function as a CloudFormation custom resource to generate and rotate the password.
  • BUse an AWS Systems Manager Parameter Store resource with the SecureString data type to generate and rotate the password.
  • CUse a cron daemon on the application’s host to generate and rotate the password.
  • DUse an AWS Secrets Manager resource to generate and rotate the password. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use an AWS Secrets Manager resource to generate and rotate the password.

Explanation

AWS Secrets Manager stores and automatically rotates secrets such as database credentials.

Topic 1 Β· Question 185

A developer has been asked to create an AWS Lambda function that is invoked any time updates are made to items in an Amazon DynamoDB table. The function has been created, and appropriate permissions have been added to the Lambda execution role. Amazon DynamoDB streams have been enabled for the table, but the function is still not being invoked. Which option would enable DynamoDB table updates to invoke the Lambda function?

  • AChange the StreamViewType parameter value to NEW_AND_OLD_IMAGES for the DynamoDB table.
  • BConfigure event source mapping for the Lambda function. (correct answer)
  • CMap an Amazon Simple Notification Service (Amazon SNS) topic to the DynamoDB streams.
  • DIncrease the maximum runtime (timeout) setting of the Lambda function.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure event source mapping for the Lambda function.

Explanation

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

Topic 1 Β· Question 186

A developer needs to deploy an application running on AWS Fargate using Amazon ECS. The application has environment variables that must be passed to a container for the application to initialize. How should the environment variables be passed to the container?

  • ADefine an array that includes the environment variables under the environment parameter within the service definition.
  • BDefine an array that includes the environment variables under the environment parameter within the task definition. (correct answer)
  • CDefine an array that includes the environment variables under the entryPoint parameter within the task definition.
  • DDefine an array that includes the environment variables under the entryPoint parameter within the service definition.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Define an array that includes the environment variables under the environment parameter within the task definition.

Topic 1 Β· Question 187 Β· Select all that apply

A development team maintains a web application by using a single AWS RDS, template. The template defines web servers and an Amazon RDS database. The team uses the CloudFormation template to deploy the CloudFormation 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 DeletionPolicy 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 CloudFormation 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 DeletionPolicy 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 188

A developer is storing sensitive data generated by an application in Amazon S3. The developer wants to encrypt the data at rest. A company policy requires an audit trail of when the AWS Key Management Service (AWS KMS) key was used and by whom. Which encryption option will meet these requirements?

  • AServer-side encryption with Amazon S3 managed keys (SSE-S3)
  • BServer-side encryption with AWS KMS managed keys (SSE-KMS) (correct answer)
  • CServer-side encryption with customer-provided keys (SSE-C)
  • DServer-side encryption with self-managed keys
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Server-side encryption with AWS KMS managed keys (SSE-KMS)

Explanation

AWS KMS manages encryption keys and integrates with most AWS services for encryption at rest.

Topic 1 Β· Question 189

A company has an ecommerce application. To track product reviews, the company’s development team uses an Amazon DynamoDB table. Every record includes the following: β€’ A Review ID, a 16-digit universally unique identifier (UUID) β€’ A Product ID and User ID, 16-digit UUIDs that reference other tables β€’ A Product Rating on a scale of 1-5 β€’ An optional comment from the user The table partition key is the Review ID. The most performed query against the table is to find the 10 reviews with the highest rating for a given product. Which index will provide the FASTEST response for this query?

  • AA global secondary index (GSI) with Product ID as the partition key and Product Rating as the sort key (correct answer)
  • BA global secondary index (GSI) with Product ID as the partition key and Review ID as the sort key
  • CA local secondary index (LSI) with Product ID as the partition key and Product Rating as the sort key
  • DA local secondary index (LSI) with Review ID as the partition key and Product ID as the sort key
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: A global secondary index (GSI) with Product ID as the partition key and Product Rating as the sort key.

Topic 1 Β· Question 190

A company needs to distribute firmware updates to its customers around the world. Which service will allow easy and secure control of the access to the downloads at the lowest cost?

  • AUse Amazon CloudFront with signed URLs for Amazon S3. (correct answer)
  • BCreate a dedicated Amazon CloudFront Distribution for each customer.
  • CUse Amazon CloudFront with AWS Lambda@Edge.
  • DUse Amazon API Gateway and AWS Lambda to control access to an S3 bucket.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Amazon CloudFront with signed URLs for Amazon S3.

Explanation

Amazon S3 provides durable, scalable object storage that is fully managed. Amazon CloudFront caches content at edge locations to reduce latency and offload origins. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 191

A developer is testing an application that invokes an AWS Lambda function asynchronously. During the testing phase, the Lambda function fails to process after two retries. How can the developer troubleshoot the failure?

  • AConfigure AWS CloudTrail logging to investigate the invocation failures.
  • BConfigure Dead Letter Queues by sending events to Amazon SQS for investigation. (correct answer)
  • CConfigure Amazon Simple Workflow Service to process any direct unprocessed events.
  • DConfigure AWS Config to process any direct unprocessed events.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure Dead Letter Queues by sending events to Amazon SQS for investigation.

Explanation

Amazon SQS is a fully managed message queue that decouples components and absorbs traffic spikes. AWS Config tracks resource configuration changes and evaluates compliance. This option decouples the components so they scale independently and absorb load spikes.

Topic 1 Β· Question 192

A company is migrating its PostgreSQL database into the AWS Cloud. The company wants to use a database that will secure and regularly rotate database credentials. The company wants a solution that does not require additional programming overhead. Which solution will meet these requirements?

  • AUse Amazon Aurora PostgreSQL for the database. Store the database credentials in AWS Systems Manager Parameter Store. Turn on rotation.
  • BUse Amazon Aurora PostgreSQL for the database. Store the database credentials in AWS Secrets Manager. Turn on rotation. (correct answer)
  • CUse Amazon DynamoDB for the database. Store the database credentials in AWS Systems Manager Parameter Store. Turn on rotation.
  • DUse Amazon DynamoDB for the database. Store the database credentials in AWS Secrets Manager. Turn on rotation.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use Amazon Aurora PostgreSQL for the database. Store the database credentials in AWS Secrets Manager. Turn on rotation.

Explanation

Amazon Aurora is a high-performance managed relational database with built-in replication and failover. AWS Secrets Manager stores and automatically rotates secrets such as database credentials.

Topic 1 Β· Question 193

A developer is creating a mobile application that will not require users to log in. What is the MOST efficient method to grant users access to AWS resources?

  • AUse an identity provider to securely authenticate with the application.
  • BCreate an AWS Lambda function to create an IAM user when a user accesses the application.
  • CCreate credentials using AWS KMS and apply these credentials to users when using the application.
  • DUse Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use Amazon Cognito to associate unauthenticated users with an IAM role that has limited access to resources.

Explanation

An IAM role grants temporary, least-privilege permissions to AWS resources without long-term credentials. AWS IAM controls authenticated and authorized access to AWS resources with fine-grained policies. Amazon Cognito manages user sign-up, sign-in and federated identity for applications.

Topic 1 Β· Question 194

A company has developed a new serverless application using AWS Lambda functions that will be deployed using the AWS Serverless Application Model (AWS SAM) CLI. Which step should the developer complete prior to deploying the application?

  • ACompress the application to a .zip file and upload it into AWS Lambda.
  • BTest the new AWS Lambda function by first tracing it in AWS X-Ray.
  • CBundle the serverless application using a SAM package. (correct answer)
  • DCreate the application environment using the eb create my-env command.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Bundle the serverless application using a SAM package.

Topic 1 Β· Question 195

A company wants to automate part of its deployment process. A developer needs to automate the process of checking for and deleting unused resources that supported previously deployed stacks but that are no longer used. The company has a central application that uses the AWS Cloud Development Kit (AWS CDK) to manage all deployment stacks. The stacks are spread out across multiple accounts. The developer’s solution must integrate as seamlessly as possible within the current deployment process. Which solution will meet these requirements with the LEAST amount of configuration?

  • AIn the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CloudFormation template from a JSON file. Use the template to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
  • BIn the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs. (correct answer)
  • CIn the central AWS CDK, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an API in AWS Amplify. Use the API to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
  • DIn the AWS Lambda console, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to import the Lambda function into the stack and to invoke the Lambda function when the deployment stack runs.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: In the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to attach the funct...

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. The AWS CDK defines cloud infrastructure as code using familiar programming languages.

Topic 1 Β· Question 196

A company built a new application in the AWS Cloud. The company automated the bootstrapping of new resources with an Auto Scaling group by using AWS CloudFormation templates. The bootstrap scripts contain sensitive data. The company needs a solution that is integrated with CloudFormation to manage the sensitive data in the bootstrap scripts. Which solution will meet these requirements in the MOST secure way?

  • APut the sensitive data into a CloudFormation parameter. Encrypt the CloudFormation templates by using an AWS Key Management Service (AWS KMS) key.
  • BPut the sensitive data into an Amazon S3 bucket. Update the CloudFormation templates to download the object from Amazon S3 during bootstrap.
  • CPut the sensitive data into AWS Systems Manager Parameter Store as a secure string parameter. Update the CloudFormation templates to use dynamic references to specify template values. (correct answer)
  • DPut the sensitive data into Amazon Elastic File System (Amazon EFS). Enforce EFS encryption after file system creation. Update the CloudFormation templates to retrieve data from Amazon EFS.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Put the sensitive data into AWS Systems Manager Parameter Store as a secure string parameter. Update the CloudFormation templates to use dynamic references to specify template values.

Explanation

Systems Manager Parameter Store securely stores configuration data and secrets. AWS Systems Manager operates and automates management of fleets of resources. AWS CloudFormation provisions infrastructure as code repeatably.

Topic 1 Β· Question 197

A company needs to set up secure database credentials for all its AWS Cloud resources. The company’s resources include Amazon RDS DB instances, Amazon DocumentDB clusters, and Amazon Aurora DB instances. The company’s security policy mandates that database credentials be encrypted at rest and rotated at a regular interval. Which solution will meet these requirements MOST securely?

  • ASet up IAM database authentication for token-based access. Generate user tokens to provide centralized access to RDS DB instances, Amazon DocumentDB clusters, and Aurora DB instances.
  • BCreate parameters for the database credentials in AWS Systems Manager Parameter Store. Set the Type parameter to SecureString. Set up automatic rotation on the parameters.
  • CStore the database access credentials as an encrypted Amazon S3 object in an S3 bucket. Block all public access on the S3 bucket. Use S3 server-side encryption to set up automatic rotation on the encryption key.
  • DCreate an AWS Lambda function by using the SecretsManagerRotationTemplate template in the AWS Secrets Manager console. Create secrets for the database credentials in Secrets Manager. Set up secrets rotation on a schedule. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create an AWS Lambda function by using the SecretsManagerRotationTemplate template in the AWS Secrets Manager console. Create secrets for the database credentials in Secrets Manager. Set up secrets rotation on a sched...

Explanation

AWS Lambda runs code without provisioning servers and scales automatically, which minimizes operational overhead. AWS Secrets Manager stores and automatically rotates secrets such as database credentials.

Topic 1 Β· Question 198

A developer has created an AWS Lambda function that makes queries to an Amazon Aurora MySQL DB instance. When the developer performs a test, the DB instance shows an error for too many connections. Which solution will meet these requirements with the LEAST operational effort?

  • ACreate a read replica for the DB instance. Query the replica DB instance instead of the primary DB instance.
  • BMigrate the data to an Amazon DynamoDB database.
  • CConfigure the Amazon Aurora MySQL DB instance for Multi-AZ deployment.
  • DCreate a proxy in Amazon RDS Proxy. Query the proxy instead of the DB instance. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a proxy in Amazon RDS Proxy. Query the proxy instead of the DB instance.

Explanation

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 199

A developer is creating a new REST API by using Amazon API Gateway and AWS Lambda. 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?

  • ASam local invoke
  • BSam local generate-event
  • CSam local start-lambda
  • DSam local start-api (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Sam local start-api.

Topic 1 Β· Question 200

A company has a serverless application on AWS that uses a fleet of AWS Lambda functions that have aliases. The company regularly publishes new Lambda function by using an in-house deployment solution. The company wants to improve the release process and to use traffic shifting. A newly published function version should initially make available only to a fixed percentage of production users. Which solution will meet these requirements?

  • AConfigure routing on the alias of the new function by using a weighted alias. (correct answer)
  • BConfigure a canary deployment type for Lambda.
  • CConfigure routing on the new versions by using environment variables.
  • DConfigure a linear deployment type for Lambda.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure routing on the alias of the new function by using a weighted alias.

Explanation

AWS Config tracks resource configuration changes and evaluates compliance.

Showing questions 181–200 of 557 Β· Page 10 of 28