Font size
WorksheetsAWS DVA-C02 Quiz by CAAI
Total questions: 25
Worksheet time: 52mins
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?
Create an IAM role with the appropriate permissions to access the required AWS services. Assign the role to the on-premises Linux server.
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.
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.
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.
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?
Use an ElastiCache for Redis cluster to store the user session state of the application.
Store the user session state of the application using CloudFront.
Use an ElastiCache for Memcached cluster to store the user session state of the application.
Use Sticky Sessions with Local Session Caching.
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?
Use the Multipart upload API.
Enable Transfer Acceleration in the bucket.
Use the BatchWriteItem API.
Use the Putltem API.
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?
<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>
<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>
<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>
<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>
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?
Configure each message in the SQS queue to have a custom visibility timeout of 10 seconds.
Configure an SQS Delay Queue with a value of 10 seconds.
Configure the SQS queue to use Long Polling.
Configure the SQS queue to use Short Polling.
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?
Create a stage variable called ENV and invoke the Lambda function by its alias name.
Create individual Lambda Layers for each environment
Publish three versions of the Lambda function. Assign the aliases DEV, UAT, and PROD to each version.
Use environment variables to set the parameters per environment.
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?
CodeDeployDefault.HalfAtATime
CodeDeployDefault.LambdaCanary10Percent5Minutes
CodeDeployDefault.LambdaLinear10PercentEvery1Minute
CodeDeployDefault.LambdaLinear10PercentEvery2Minutes
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?
Create a Secure String Parameter using the AWS Systems Manager Parameter Store.
Use AWS Lambda environment variables encrypted with KMS which will be shared by the Lambda functions.
Create an IAM Execution Role that has access to RDS and attach it to the Lambda functions.
Use AWS Lambda environment variables encrypted with CloudHSM.
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?
Create a parameter to the Systems Manager Parameter Store using the PutParameter API with a type of SecureString.
Enable IAM DB authentication which rotates the credentials by default.
Create a secret in AWS Secrets Manager and enable automatic rotation of the database credentials.
Create an IAM Role which has full access to the database. Attach the role to the services which require access.
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?
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
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
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
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
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?
Elastic Beanstalk will not replace the failed instances
Elastic Beanstalk will replace the failed instances with instances running the application version from the oldest successful deployment
Elastic Beanstalk will replace the failed instances after the application version to be installed is manually chosen from AWS Console
Elastic Beanstalk will replace the failed instances with instances running the application version from the most recent successful deployment
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?
Use Global Accelerator to transparently switch between S3 bucket and load balancer for different data needs
Use CloudFront's Lambda@Edge feature to server data from S3 buckets and load balancer programmatically on-the-fly
Configure CloudFront with multiple origins to serve both static and dynamic content at low latency to global users
Use CloudFront's Origin Groups to group both static and dynamic requests into one request for further processing
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?
Security Groups
The ALB is warming up
IAM Roles
The application is down
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?
Leverage vertical scaling for the application instance by provisioning a larger Amazon EC2 instance size
Leverage horizontal scaling for the web and application tiers by using Auto Scaling groups and Application Load Balancer
Leverage horizontal scaling for the application's persistence layer by adding Oracle RAC on AWS
Leverage SQS with asynchronous AWS Lambda calls to decouple the application and data tiers
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
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 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 separate interface endpoint for S3 and DynamoDB each. Then connect to these services using the private IP address
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
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?
Use Environment variables to pass in the RDS connection string
Configure Lambda to connect to VPC with private subnet and Security Group needed to access RDS
Use Lambda layers to connect to the internet and RDS separately
Configure lambda to connect to the public subnet that will give internet access and use Security Group to access RDS inside the private subnet
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?
Amazon Elastic File System (EFS) Standard–IA storage class
Amazon Elastic Block Store (EBS)
Amazon S3 Standard-Infrequent Access (S3 Standard-IA) storage class
Amazon Elastic File System (EFS) Standard storage class
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)?
AWS Serverless Application Model (AWS SAM)
AWS Autoscaling
AWS Elastic Beanstalk
AWS CodeBuild
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?
PurgeQueue
RemoveQueue
DeleteQueue
RemovePermission
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?
AWS Cloud Development Kit (CDK)
AWS Serverless Application Model (SAM)
AWS CodeDeploy
AWS CloudFormation
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)
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
You can't change the queue type after you create it
The length of time, in seconds, for which the delivery of all messages in the queue is delayed is configured using MessageRetentionPeriod attribute
Queue tags are case insensitive. A new tag with a key identical to that of an existing tag overwrites the existing tag
The visibility timeout value for the queue is in seconds, which defaults to 30 seconds
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?
Stack B, then Stack C, then Stack A
Stack A, then Stack B, then Stack C
Stack C then Stack A then Stack B
Stack A, Stack C then Stack B
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)
Blue/green Deployment
Pilot Light Deployment
Warm Standby Deployment
Cattle Deployment
In-place Deployment
What steps can a developer take to optimize the performance of a CPU-bound AWS Lambda function and ensure fast response time?
Increase the function's CPU
Increase the function's memory
Increase the function's provisioned concurrency
Increase the function's timeout
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?
HTTP 504: Gateway timeout
HTTP 500: Internal server error
HTTP 502: Bad gateway
HTTP 503: Service unavailable
