AWS Certified Developer Associate DVA-C01 – Question246

A developer uses the Amazon S3 ListObjectsV2 API call to retrieve and list object keys from an S3 bucket. The list can contain thousands of keys, and the retrieval often returns more than the max-keys maximum value. The code must handle any number of returned results.
How can the developer modify the code to handle any number of returns?

A.
Set max-keys in the ListObjectsV2 API call to the expected number of returned objects.
B. Set max-keys in the ListObjectsV2 API call to -1.
C. Run an S3 Select query to retrieve and list object keys from the bucket.
D. When applicable, repeat the ListObjectsV2 API call by using NextContinuationToken.

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question245

A developer has written an application that runs on Amazon EC2 instances. The developer is adding functionality for the application to write objects to an Amazon S3 bucket.
Which policy must the developer modify to allow the instances to write these objects?

A.
The IAM policy that is attached to the EC2 instance profile role.
B. The session policy that is applied to the EC2 instance role session.
C. The AWS Key Management Service (AWS KMS) key policy that is attached to the EC2 instance profile role.
D. The Amazon VPC endpoint policy.

Correct Answer: A

AWS Certified Developer Associate DVA-C01 – Question244

A developer is building a static, client-side rendered website that is powered by ReactJS. The code has no server-side generated components and does not need to run any programming languages on the server.
However, the code serves static HTML, CSS, and JavaScript to the client on each request. The developer's solution to host the website must maximize performance and cost-effectiveness.
Which combination of AWS services or resources should the developer use to meet these requirements?

A.
Application Load Balancer and Amazon EC2
B. Amazon API Gateway and AWS Lambda
C. Amazon CloudFront and Amazon S3
D. Amazon CloudFront and AWS Elastic Beanstalk

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question243

An application adds a processing date to each transaction that it receives. The application writes each transaction to an Amazon DynamoDB table by using the PutItem operation. Each transaction has a unique ID (transactionID). Sometimes the application receives transactions more than once.
A developer notices that duplicate transactions in DynamoDB have the latest processing date instead of the date when the transaction was first received. Duplicate records happen infrequently, and most of the transactions are unique.
What is the MOST cost-effective solution that the developer can implement to ensure that PutItem does not update an existing record?

A.
Call the GetItem operation first to confirm that the record does not exist. Then call PutItem.
B. Enable the TTL attribute on the DynamoDB table.
C. Implement a conditional put by using the attribute_exists(transactionID) condition expression.
D. Implement a conditional put by using the attribute_not_exists(transactionID) condition expression.

Correct Answer: B

AWS Certified Developer Associate DVA-C01 – Question242

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?

A.
CloudFormation serverless intrinsic functions
B. AWS Elastic Beanstalk
C. AWS Serverless Application Model (AWS SAM)
D. AWS Cloud Development Kit (AWS CDK)

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question241

A company has three different environments: Development. QA, and Production. The company wants to deploy its code first in the Development environment, then QA, and then Production.
Which AWS service can be used to meet this requirement?

A.
Use AWS CodeCommit to create multiple repositories to deploy the application.
B. Use AWS CodeBuild to create, configure, and deploy multiple build application projects.
C. Use AWS Data Pipeline to create multiple data pipeline provisions to deploy the application.
D. Use AWS CodeDeploy to create multiple deployment groups.

Correct Answer: A

AWS Certified Developer Associate DVA-C01 – Question240

A company is migrating legacy internal applications to AWS. Leadership wants to rewrite the internal employee directory to use native AWS services A developer needs to create a solution for storing employee contact details and high-resolution photos for use with the new application.
Which solution will enable the search and retrieval of each employee's individual details and high-resolution photos using AWS APIs?

A.
Encode each employee's contact information and photos using Base64 Store the information in an Amazon DynamoDB table using a sort key.
B. Store each employee's contact information in an Amazon DynamoDB table along with the object keys for the photos stored in Amazon S3.
C. Use Amazon Cognito user pools to implement the employee directory in a fully managed software-as-a- service (SaaS) method.
D. Store employee contact information in an Amazon RDS DB instance with the photos stored in Amazon Elastic File System (Amazon EFS).

Correct Answer: B

AWS Certified Developer Associate DVA-C01 – Question239

A developer is writing a serverless application that requires an AWS Lambda function to be invoked every 10 minutes.
What is an automated and serverless way to invoke the function?

A.
Deploy an Amazon EC2 instance based on Linux, and edit its /etc/crontab file by adding a command to periodically invoke the Lambda function.
B. Configure an environment variable named PERIOD for the Lambda function. Set the value to 600.
C. Create an Amazon EventBridge (Amazon CloudWatch Events) rule that runs on a regular schedule to invoke the Lambda function.
D. Create an Amazon Simple Notification Service (Amazon SNS) topic that has a subscription to the Lambda function with a 600-second timer.

Correct Answer: C

AWS Certified Developer Associate DVA-C01 – Question238

A developer is using an AWS CodePipeline pipeline to provide continuous integration and continuous delivery (CI/CD) support for a Java application. The developer needs to update the pipeline to support the introduction of a new application dependency .jar file. The pipeline must start a build when a new version of the .jar file becomes available.
Which solution will meet these requirements?

A.
Create an Amazon S3 bucket to store the dependency .jar file. Publish the dependency .jar file to the S3 bucket. Use an Amazon Simple Notification Service (Amazon SNS) notification to start a CodePipeline pipeline build.
B. Create an Amazon Elastic Container Registry (Amazon ECR) private repository. Publish the dependency jar file to the repository. Use an ECR source action to start a CodePipeline pipeline build.
C. Create an Amazon Elastic Container Registry (Amazon ECR) private repository. Publish the dependency .jar file to the repository. Use an Amazon Simple Notification Service (Amazon SNS) notification to start a CodePipeline pipeline build.
D. Create an AWS CodeArtifact repository. Publish the dependency .jar file to the repository. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to start a CodePipeline pipeline build.

Correct Answer: D

AWS Certified Developer Associate DVA-C01 – Question237

A developer is writing a new serverless application for a company. Several other developers must collaborate on the code for this application, and the company expects frequent changes to the code. The developer needs to deploy the code from source control to AWS Lambda with the fewest number of manual steps.
Which strategy for the build and deployment should the developer use to meet these requirements?

A.
Build the code locally, and then upload the code into the source control system. When a release is needed, run AWS CodePipeline to extract the uploaded build and deploy the resources.
B. Use the AWS Serverless Application Model (AWS SAM) CLI to build and deploy the application from the developer's local machine with the latest version checked out locally.
C. Use AWS CodeBuild and AWS CodePipeline to invoke builds and corresponding deployments when configured source controlled branches have pull requests merged into them
D. Use the Lambda console to upload a .zip file of the application that is created by the AWS Serverless Application Model (AWS SAM) CLI build command.

Correct Answer: A