wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AWS DVA-C02 Quiz by CAAI

Total questions: 25

Worksheet time: 52mins

Name
Class
Date
1.

A programmer is developing a Node.js application that will be run on a Linux server in their on-premises data center. The application will access various AWS services such as S3, DynamoDB, and ElastiCache using the AWS SDK.

Which of the following is the MOST suitable way to provide access for the developer to accomplish the specified task?

a)
  1. Create an IAM role with the appropriate permissions to access the required AWS services. Assign the role to the on-premises Linux server.

b)
  1. Go to the AWS Console and create a new IAM user with programmatic access. In the application server, create the credentials file at ~/.aws/credentials with the access keys of the IAM user.

c)
  1. Create an IAM role with the appropriate permissions to access the required AWS services and assign the role to the on-premises Linux server. Whenever the application needs to access any AWS services, request temporary security credentials from STS using the AssumeRole API.

d)

Go to the AWS Console and create a new IAM User with the appropriate permissions. In the application server, create the credentials file at ~/.aws/credentials with the username and the hashed password of the IAM User.

2.

A developer is moving a legacy web application from their on-premises data center to AWS. The application is used simultaneously by thousands of users, and their session states are stored in memory. The on-premises server usually reaches 100% CPU Utilization every time there is a surge in the number of people accessing the application.

Which of the following is the best way to re-factor the performance and availability of the application’s session management once it is migrated to AWS?

a)
  1. Use an ElastiCache for Redis cluster to store the user session state of the application.

b)
  1. Store the user session state of the application using CloudFront.

c)
  1. Use an ElastiCache for Memcached cluster to store the user session state of the application.

d)
  1. Use Sticky Sessions with Local Session Caching.

3.

A web application is uploading large files, which are over 4 GB in size, in an S3 bucket called http://data.academy.com every 30 minutes. You want to minimize the time required to upload each file. Which of the following should you do to minimize upload time?

a)
  1. Use the Multipart upload API.

b)
  1. Enable Transfer Acceleration in the bucket.

c)
  1. Use the BatchWriteItem API.

d)
  1. Use the Putltem API.

4.

A web application is using an ElastiCache cluster that is suffering from cache churn. A developer needs to reconfigure the application so that data are retrieved from the database only in the event that there is a cache miss.

Which pseudocode illustrates the caching strategy that the developer needs to implement?

a)

<pre>
get_item(item_id):
     item_value = cache.get(item_id)
     if item_value is None:
          item_value = database.query(“SELECT * FROM Items WHERE id = ?”, item_id)
          cache.add(item_id, item_value)
     return item_value
</pre>

b)

<pre>
get_item(item_id):
        item_value = database.query(“SELECT * FROM Items WHERE id = ?”, item_id)
        if item_value is None:
             item_value = cache.set(item_id, item_value)
             cache.add(item_id, item_value)
        return item_value
</pre>

c)

<pre>
get_item(item_id):
        item_value = cache.get(item_id)
        if item_value is not None:
             item_value = database.query(“SELECT * FROM Items WHERE id = ?”, item_id)
             cache.add(item_id, item_value)
             return item_value
        else:
              return item_value
</pre>

d)

<pre>
get_item(item_id, item_value):
        item_value = database.query(“UPDATE Items WHERE id = ?”, item_id, item_value)
        cache.add(item_id, item_value)
        return ‘ok’
</pre>

5.

A Software Engineer is developing an application that will be hosted on an EC2 instance and read messages from a standard SQS queue. The average time that it takes for the producers to send a new message to the queue is 10 seconds.

Which of the following is the MOST efficient way for the application to query the new messages from the queue?

a)
  1. Configure each message in the SQS queue to have a custom visibility timeout of 10 seconds.

b)
  1. Configure an SQS Delay Queue with a value of 10 seconds.

c)
  1. Configure the SQS queue to use Long Polling.

d)
  1. Configure the SQS queue to use Short Polling.

6.

A developer has deployed a Lambda function that runs in DEV, UAT, and PROD environments. The function uses different parameters that varies based on the environment it is running in. The parameters are currently hardcoded in the function.

Which action should the developer do to reference the appropriate parameters without modifying the code every time the environment changes?

a)
  1. Create a stage variable called ENV and invoke the Lambda function by its alias name.

b)
  1. Create individual Lambda Layers for each environment

c)
  1. Publish three versions of the Lambda function. Assign the aliases DEV, UAT, and PROD to each version.

d)
  1. Use environment variables to set the parameters per environment.

7.

A developer has recently completed a new version of a serverless application that is ready to be deployed using AWS SAM. There is a requirement that the traffic should shift from the previous Lambda function to the new version in the shortest time possible, but you still don’t want to shift traffic all-at-once immediately.

Which deployment configuration is the MOST suitable one to use in this scenario?

a)
  1. CodeDeployDefault.HalfAtATime

b)
  1. CodeDeployDefault.LambdaCanary10Percent5Minutes

c)
  1. CodeDeployDefault.LambdaLinear10PercentEvery1Minute

d)
  1. CodeDeployDefault.LambdaLinear10PercentEvery2Minutes

8.

A serverless application is composed of several Lambda functions which reads data from RDS. These functions must share the same connection string that should be encrypted to improve data security.

Which of the following is the MOST secure way to meet the above requirement?

a)
  1. Create a Secure String Parameter using the AWS Systems Manager Parameter Store.

b)
  1. Use AWS Lambda environment variables encrypted with KMS which will be shared by the Lambda functions.

c)
  1. Create an IAM Execution Role that has access to RDS and attach it to the Lambda functions.

d)
  1. Use AWS Lambda environment variables encrypted with CloudHSM.

9.

To improve their information security management system (ISMS), a company recently released a new policy which requires all database credentials to be encrypted and be automatically rotated to avoid unauthorized access.

Which of the following is the MOST appropriate solution to secure the credentials?

a)
  1. Create a parameter to the Systems Manager Parameter Store using the PutParameter API with a type of SecureString.

b)
  1. Enable IAM DB authentication which rotates the credentials by default.

c)
  1. Create a secret in AWS Secrets Manager and enable automatic rotation of the database credentials.

d)
  1. Create an IAM Role which has full access to the database. Attach the role to the services which require access.

10.

A development team at a social media company uses AWS Lambda functions for its serverless stack on AWS Cloud. For a new deployment, the Team Lead wants to send only a certain portion of the traffic to a new version of a Lambda function. In case the deployment goes wrong, the solution should also support the ability to roll back to a previous version of the Lambda function, with MIMINUM downtime for the application.

As a Developer Associate, which of the following options would you recommend to address this use-case?

a)

Set up the application to directly deploy the new Lambda version. If the deployment goes wrong, reset the application back to the current version using the version number in the ARN

b)

Set up the application to use an alias that points to the current version. Deploy the new version of the code and configure alias to send all users to this new version. If the deployment goes wrong, reset the alias to point to the current version

c)

Set up the application to use an alias that points to the current version. Deploy the new version of the code and configure the alias to send 10% of the users to this new version. If the deployment goes wrong, reset the alias to point all traffic to the current version

d)

Set up the application to have multiple alias of the Lambda function. Deploy the new version of the code. Configure a new alias that points to the current alias of the Lambda function for handling 10% of the traffic. If the deployment goes wrong, reset the new alias to point all traffic to the most recent working alias of the Lambda function

11.

When running a Rolling deployment in Elastic Beanstalk environment, only two batches completed the deployment successfully, while rest of the batches failed to deploy the updated version. Following this, the development team terminated the instances from the failed deployment.

What will be the status of these failed instances post termination?

a)

Elastic Beanstalk will not replace the failed instances

b)

Elastic Beanstalk will replace the failed instances with instances running the application version from the oldest successful deployment

c)

Elastic Beanstalk will replace the failed instances after the application version to be installed is manually chosen from AWS Console

d)

Elastic Beanstalk will replace the failed instances with instances running the application version from the most recent successful deployment

12.

A website serves static content from an Amazon Simple Storage Service (Amazon S3) bucket and dynamic content from an application load balancer. The user base is spread across the world and latency should be minimized for a better user experience.

Which technology/service can help access the static and dynamic content while keeping the data latency low?

a)

Use Global Accelerator to transparently switch between S3 bucket and load balancer for different data needs

b)

Use CloudFront's Lambda@Edge feature to server data from S3 buckets and load balancer programmatically on-the-fly

c)

Configure CloudFront with multiple origins to serve both static and dynamic content at low latency to global users

d)

Use CloudFront's Origin Groups to group both static and dynamic requests into one request for further processing

13.

You are responsible for an application that runs on multiple Amazon EC2 instances. In front of the instances is an Internet-facing load balancer that takes requests from clients over the internet and distributes them to the EC2 instances. A health check is configured to ping the index.html page found in the root directory for the health status. When accessing the website via the internet visitors of the website receive timeout errors.

What should be checked first to resolve the issue?

a)

Security Groups

b)

The ALB is warming up

c)

IAM Roles

d)

The application is down

14.

A company's e-commerce application becomes slow when traffic spikes. The application has a three-tier architecture (web, application and database tier) that uses synchronous transactions. The development team at the company has identified certain bottlenecks in the application tier and it is looking for a long term solution to improve the application's performance.

As a developer associate, which of the following solutions would you suggest to meet the required application response times while accounting for any traffic spikes?

a)

Leverage vertical scaling for the application instance by provisioning a larger Amazon EC2 instance size

b)

Leverage horizontal scaling for the web and application tiers by using Auto Scaling groups and Application Load Balancer

c)

Leverage horizontal scaling for the application's persistence layer by adding Oracle RAC on AWS

d)

Leverage SQS with asynchronous AWS Lambda calls to decouple the application and data tiers

15.

An e-commerce company has multiple EC2 instances operating in a private subnet which is part of a custom VPC. These instances are running an image processing application that needs to access images stored on S3. Once each image is processed, the status of the corresponding record needs to be marked as completed in a DynamoDB table.

How would you go about providing private access to these AWS resources which are not part of this custom VPC?

  • Create a gateway endpoint for S3 and add it as a target in the route table of the custom VPC. Create an interface endpoint for DynamoDB and then connect to the DynamoDB service using the private IP address

  • Create a separate interface endpoint for S3 and DynamoDB each. Then connect to these services using the private IP address

  • Create a separate gateway endpoint for S3 and DynamoDB each. Add two new target entries for these two gateway endpoints in the route table of the custom VPC

  • Create a gateway endpoint for DynamoDB and add it as a target in the route table of the custom VPC. Create an API endpoint for S3 and then connect to the S3 service using the private IP address

a)


Create a gateway endpoint for S3 and add it as a target in the route table of the custom VPC. Create an interface endpoint for DynamoDB and then connect to the DynamoDB service using the private IP address

b)

Create a separate gateway endpoint for S3 and DynamoDB each. Add two new target entries for these two gateway endpoints in the route table of the custom VPC

c)

Create a separate interface endpoint for S3 and DynamoDB each. Then connect to these services using the private IP address

d)

Create a gateway endpoint for DynamoDB and add it as a target in the route table of the custom VPC. Create an API endpoint for S3 and then connect to the S3 service using the private IP address

16.

You have migrated an on-premise SQL Server database to an Amazon Relational Database Service (RDS) database attached to a VPC inside a private subnet. Also, the related Java application, hosted on-premise, has been moved to an Amazon Lambda function.

Which of the following should you implement to connect AWS Lambda function to its RDS instance?

a)

Use Environment variables to pass in the RDS connection string

b)

Configure Lambda to connect to VPC with private subnet and Security Group needed to access RDS

c)

Use Lambda layers to connect to the internet and RDS separately

d)

Configure lambda to connect to the public subnet that will give internet access and use Security Group to access RDS inside the private subnet

17.

A company is looking at storing their less frequently accessed files on AWS that can be concurrently accessed by hundreds of EC2 instances. The company needs the most cost-effective file storage service that provides immediate access to data whenever needed.

Which of the following options represents the best solution for the given requirements?

a)

Amazon Elastic File System (EFS) Standard–IA storage class

b)

Amazon Elastic Block Store (EBS)

c)

Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class

d)

Amazon Elastic File System (EFS) Standard storage class

18.

AWS CloudFormation helps model and provision all the cloud infrastructure resources needed for your business.

Which of the following services rely on CloudFormation to provision resources (Select two)?

a)

AWS Serverless Application Model (AWS SAM)

b)

AWS Autoscaling

c)

AWS Elastic Beanstalk

d)

AWS CodeBuild

19.

A developer is testing Amazon Simple Queue Service (SQS) queues in a development environment. The queue along with all its contents has to be deleted after testing.

Which SQS API should be used for this requirement?

a)

PurgeQueue

b)

RemoveQueue

c)

DeleteQueue

d)

RemovePermission

20.

A development team wants to build an application using serverless architecture. The team plans to use AWS Lambda functions extensively to achieve this goal. The developers of the team work on different programming languages like Python, .NET and Javascript. The team wants to model the cloud infrastructure using any of these programming languages.

Which AWS service/tool should the team use for the given use-case?

a)

AWS Cloud Development Kit (CDK)

b)

AWS Serverless Application Model (SAM)

c)

AWS CodeDeploy

d)

AWS CloudFormation

21.

Amazon Simple Queue Service (SQS) has a set of APIs for various actions supported by the service.

As a developer associate, which of the following would you identify as correct regarding the CreateQueue API? (Select two)

a)

The dead-letter queue of a FIFO queue must also be a FIFO queue. Whereas, the dead-letter queue of a standard queue can be a standard queue or a FIFO queue

b)

You can't change the queue type after you create it

c)

The length of time, in seconds, for which the delivery of all messages in the queue is delayed is configured using MessageRetentionPeriod attribute

d)

Queue tags are case insensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag

e)

The visibility timeout value for the queue is in seconds, which defaults to 30 seconds

22.

As an AWS certified developer associate, you are working on an AWS CloudFormation template that will create resources for a company's cloud infrastructure. Your template is composed of three stacks which are Stack-A, Stack-B, and Stack-C. Stack-A will provision a VPC, a security group, and subnets for public web applications that will be referenced in Stack-B and Stack-C.

After running the stacks you decide to delete them, in which order should you do it?

a)

Stack B, then Stack C, then Stack A

b)

Stack A, then Stack B, then Stack C

c)

Stack C then Stack A then Stack B

d)

Stack A, Stack C then Stack B

23.

You have a Java-based application running on EC2 instances loaded with AWS CodeDeploy agents. You are considering different options for deployment, one is the flexibility that allows for incremental deployment of your new application versions and replaces existing versions in the EC2 instances. The other option is a strategy in which an Auto Scaling group is used to perform a deployment.

Which of the following options will allow you to deploy in this manner? (Select two)

a)


Blue/green Deployment

b)

Pilot Light Deployment

c)

Warm Standby Deployment

d)

Cattle Deployment

e)

In-place Deployment

24.

What steps can a developer take to optimize the performance of a CPU-bound AWS Lambda function and ensure fast response time?

a)

Increase the function's CPU

b)

Increase the function's memory

c)

Increase the function's provisioned concurrency

d)

Increase the function's timeout

25.

A developer has created a new Application Load Balancer but has not registered any targets with the target groups.

Which of the following errors would be generated by the Load Balancer?

a)

HTTP 504: Gateway timeout

b)

HTTP 500: Internal server error

c)

HTTP 502: Bad gateway

d)


HTTP 503: Service unavailable