Amazon Web Services certification · Exam DVA-C02

DVA-C02 Mock Exam Page 6

AWS Certified Developer - Associate

Free DVA-C02 mock exam questions 51–60, each with the answer and an explanation.

20 questions · 33 minutes · free, no sign-up

Free DVA-C02 questions

51–60 of 110 free
Question 51 Choose 1
A developer is deploying a company's application to Amazon EC2 instances The application generates gigabytes of data files each day The files are rarely accessed but the files must be available to the application's users within minutes of a request during the first year of storage The company must retain the files for 7 years. How can the developer implement the application to meet these requirements MOST costeffectively?
Show answerHide answer

Correct answer: A Store the files in an Amazon S3 bucket Use the S3 Glacier Instant Retrieval storage class Create an S3 Lifecycle policy to transition the files to the S3 Glacier Deep Archive storage class after 1 year

Explanation

Explanation: Amazon S3 Glacier Instant Retrieval is an archive storage class that delivers the lowest-cost storage for long-lived data that is rarely accessed and requires retrieval in milliseconds. With S3 Glacier Instant Retrieval, you can save up to 68% on storage costs compared to using the S3 Standard-Infrequent Access (S3 Standard-IA) storage class, when your data is accessed once per quarter. https://aws.amazon.com/s3/storageclasses/ glacier/instant-retrieval/
  • Understanding Storage Requirements:
  • Why S3 Glacier Instant Retrieval:
  • Why S3 Glacier Deep Archive:
  • S3 Lifecycle Policy:
Question 52 Choose 2
A developer is troubleshooting a three-tier application, which is deployed on Amazon EC2 instances. There is a connectivity problem between the application servers and the database servers.
Which AWS services or tools should be used to identify the faulty component? (Select TWO.)
Show answerHide answer

Correct answer: C, D Amazon VPC Flow Logs Network access control lists

Question 53 Choose 1
An application interacts with Amazon Aurora to store and track customer information. The primary database is set up with multiple read replicas for improving the performance of the read queries. However, one of the Aurora replicas is receiving most or all of the traffic, while the other Aurora replica remains idle. How can this issue be resolved?
Show answerHide answer

Correct answer: A Disable application-level DNS caching.

Question 54 Choose 1
A company needs to deploy all its cloud resources by using AWS CloudFormation templates A developer must create an Amazon Simple Notification Service (Amazon SNS) automatic notification to help enforce this rule. The developer creates an SNS topic and subscribes the email address of the company's security team to the SNS topic.
The security team must receive a notification immediately if an 1AM role is created without the use of CloudFormation.
Which solution will meet this requirement?
Show answerHide answer

Correct answer: D Create an Amazon EventBridge rule to filter events from CloudTrail if a role was created without CloudFormation Specify the SNS topic as the target of the EventBridge rule.

Question 55 Choose 1
A company has an Amazon S3 bucket containing premier content that it intends to make available to only paid subscribers of its website. The S3 bucket currently has default permissions of all objects being private to prevent inadvertent exposure of the premier content to non-paying website visitors. How can the company Limit the ability to download a premier content file in the S3 Bucket to paid subscribers only?
Show answerHide answer

Correct answer: B Generate a pre-signed object URL for the premier content file when a pad subscriber requests a download.

Explanation

Explanation: This solution will limit the ability to download a premier content file in the S3 bucket to paid subscribers only because it uses a pre-signed object URL that grants temporary access to an S3 object for a specified duration. The pre-signed object URL can be generated by the company’s website when a paid subscriber requests a download, and can be verified by Amazon S3 using the signature in the URL. Option A is not optimal because it will allow anyone to download the content from the S3 bucket without verifying their subscription status. Option C is not optimal because it will require additional steps and costs to configure multi-factor authentication for accessing the S3 bucket objects, which may not be feasible or user-friendly for paid subscribers. Option D is not optimal because it will not prevent non-paying website visitors from accessing the S3 bucket objects, but only encrypt them at rest.
Question 56 Choose 1
A developer is optimizing an AWS Lambda function and wants to test the changes in production on a small percentage of all traffic. The Lambda function serves requests to a REST API in Amazon API Gateway. The developer needs to deploy their changes and perform a test in production without changing the API Gateway URL. Which solution will meet these requirements?
Show answerHide answer

Correct answer: C Define an alias on the $LATEST version of the Lambda function. Update the API Gateway endpoint to reference the new Lambda function alias. Upload andpublish the optimized Lambda function code. On the production API Gateway stage, define a canary release and set the percentage of traffic to direct to the canary release. Update the API Gateway endpoint to use the SLAT EST version of the Lambda function. Publish to the canary stage.

Explanation

Explanation:
A Lambda alias is a pointer to a specific Lambda function version or another alias1. A Lambda alias allows you to invoke different versions of a function using the same name1. You can also split traffic between two aliases by assigning weights to them1.
In this scenario, the developer needs to test their changes in production on a small percentage of all traffic without changing the API Gateway URL. To achieve this, the developer can follow these steps:
By using this solution, the developer can test their changes in production on a small percentage of all traffic without changing the API Gateway URL. The developer can also monitor and compare metrics between the canary and production releases, and promote or disable the canary as needed2.
Question 57 Choose 1
A developer is managing an application that uploads user files to an Amazon S3 bucket named companybucket. The company wants to maintain copies of all the files uploaded by users forcompliance purposes, while ensuring users still have access to the data through the application. Which IAM permissions should be applied to users to ensure they can create but not remove files from the bucket?
Show answerHide answer

Correct answer: D {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "statement1",
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": ["arn:aws:s3:::companybucket"]
}
]
}

Explanation

Explanation:
To meet the requirement:
Users must be able to upload (PutObject) and read (GetObject) files but not delete them.
Option D ensures users cannot delete files by omitting the s3:DeleteObject action while allowing s3:GetObject and s3:PutObject.
Option A: Includes s3:DeleteObject, which allows users to delete files and does not meet the requirement.
Option B: Contains unrelated actions like CreateBucket, which is not relevant here.
Option C: Adds s3:PutObjectRetention, which is unnecessary and does not restrict DeleteObject.
Question 58 Select all that apply
A developer is investigating an issue in part of a company's application. In the application messages are sent to an Amazon Simple Queue Service (Amazon SQS) queue The AWS Lambda function polls messages from the SQS queue and sends email messages by using Amazon Simple Email Service (Amazon SES) Users have been receiving duplicate email messages during periods of high traffic. Which reasons could explain the duplicate email messages? (Select TWO.)
Show answerHide answer

Correct answer: A Standard SQS queues support at-least-once message delivery

Explanation

Explanation:
  • SQS Delivery Behavior: Standard SQS queues guarantee at-least-once delivery, meaning messages may be processed more than once. This can lead to duplicate emails in this scenario.
  • Visibility Timeout: If the visibility timeout on the SQS queue is too short, a message might become visible for another consumer before the first Lambda function finishes processing it. This can also lead to duplicates.
Question 59 Choose 1
A healthcare company is developing a multi-tier web application to manage patient records that are in an Amazon Aurora PostgreSQL database cluster. The company stores the application code in a Git repository and deploys the code to Amazon EC2 instances.
The application must comply with security policies and follow the principle of least privilege. The company must securely manage database credentials and API keys within the application code. The company must have the ability to rotate encryption keys on demand.
Which solution will meet these requirements?
Show answerHide answer

Correct answer: A Store database credentials and API keys in AWS Secrets Manager. Use AWS managed AWS KMS keys. Set up automatic key rotation. Use the AWS SDK to retrieve secrets.

Explanation

Explanation: Requirement Summary:
Multi-tier app on EC2 + Aurora PostgreSQL
Must comply withleast privilegeandsecurity policies
Need to managecredentials and API keys securely
Must supportkey rotation on demand
Evaluate Options:
A. Secrets Manager + AWS managed KMS keys
Best practice for secure secret storage
Supportsauto rotation
Uses AWS SDK to fetch at runtime (secure, avoids hardcoding)
AWS managed keys arerotated automaticallyandeasier to manage
B. Secrets Manager + customer managed keys
Also valid, butadds complexity
Since the question asks forLEAST development effort, AWS-managed keys are preferred
C. Store secrets in code
Violates all security best practices
D. Use SSM Parameter Store + AWS managed keys
Possible, butSecrets Manageris preferred when rotation is needed
Parameter Store doesnot natively rotate secrets
Question 60 Choose 1
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?
Show answerHide answer

Correct answer: C Bundle the serverless application using a SAM package.

Explanation

Explanation:
This step should be completed prior to deploying the application because it prepares the application artifacts for deployment. The AWS Serverless Application Model (AWS SAM) is a framework that simplifies building and deploying serverless applications on AWS. The AWS SAM CLI is a command-line tool that helps you create, test, and deploy serverless applications using AWS SAM templates. The sam package command bundles the application artifacts, such as Lambda function code and API definitions, and uploads them to an Amazon S3 bucket. The command also returns a CloudFormation template that is ready to be deployed with the sam deploy command. Compressing the application to a zip file and uploading it to AWS Lambda will not work because it does not use AWS SAM templates or CloudFormation. Testing the new Lambda function by first tracing it in AWS XRay will not prepare the application for deployment, but only monitor its performance and errors. Creating the application environment using the eb create my-env command will not work because it is a command for AWS Elastic Beanstalk, not AWS SAM.
Full mock exam

Sit the DVA-C02 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real DVA-C02 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full DVA-C02 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 368questions in the bank
  • Newmock on every attempt