Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AWS Certified Developer - Associate (DVA-C02) - Practice Exam 3

Total questions: 65

Worksheet time: 3hrs 15mins

Name
Class
Date
1.

You are working on a social media application that allows users to share BBQ recipes and photos. You would like to schedule a Lambda function to run every 10 minutes that checks for the latest posts and sends a notification, including an image thumbnail, to users who have previously engaged with posts from the same user. How can you configure your function to automatically run at 10-minute intervals?

a)

Use Lambda with cron to schedule the function.

b)

Use EC2 with cron to schedule the function.

c)

Use Amazon EventBridge Events to schedule the function.

d)

Use Amazon Simple Workflow Service (SWF) to schedule the function.

2.

You are working on a serverless application written in Python and running in Lambda. You have uploaded multiple versions of your code to Lambda, but would like to make sure your test environment always utilizes the latest version. Which methods can achieve this with the least amount of development effort?

(Choose3)

a)

Reference the function using a qualified ARN and the $LATEST suffix.

b)

Reference the function using an unqualified ARN.

c)

Create another function to automatically update your function alias to point to the latest version of the code every time it is updated.

d)

Create an alias and provide the name of the most recent version of your function.

e)

Configure the alias to automatically update to point to the latest version of the code every time it is updated.

3.

You are developing a video streaming application that users can access using multiple devices, for example, laptop, tablet, and cell phone. You would like to be able to track usage across the different devices and limit the number of devices from which a user can stream content. Which of the following AWS technologies could you use to achieve this?

a)

Store device metadata linked to session state in ElastiCache.

b)

Use Cognito to track and remember the devices.

c)

Use S3 to store metadata about the device and link it to session state held in DynamoDB.

d)

Use MFA on the device to track and remember the devices.

4.

You are migrating a restaurant booking application from your own data center to AWS. The application currently runs on a number of virtual machines running web and application servers, as well as a shared database server. The application needs to access a large number of shared images and documents containing drinks and food menus. You would like to implement a solution that includes shared storage and also grants the EC2 instances permissions to access the shared files. Which of the following options can best meet your needs?

(Choose2)

a)

Store the files in ElastiCache.

b)

Generate a pre-signed URL to grant access.

c)

Use an IAM instance role to grant access.

d)

Embed IAM credentials in the EC2 instance metadata.

e)

Store the files in S3.

5.

A developer wants to track the average time it takes to complete customer transactions for an application running on a group of EC2 instances, including the ability to view and track statistics, like how long it takes to complete an average customer request and the maximum request latency, across the all instances. The support team would like to receive an immediate notification if the average transaction completion time exceeds three seconds for one minute or longer. Which of the following will meet these requirements?

a)


Configure a Lambda function to record transaction completion times, and add them to a log file stored in S3. Use Athena to query the S3 data based on transaction completion time, and create a CloudWatch dashboard based on the completion times to view the latest statistics. Configure a CloudWatch alarm to send an SNS notification to the support team if the average transaction completion time exceeds three seconds for one minute or longer.

b)


Configure the application to record transaction completion times to the operating system log file. Install and configure the Amazon CloudWatch agent on the EC2 instances and send the operating system log to CloudWatch Logs. Use a metric filter based on transaction completion time, and create a CloudWatch dashboard based on the metric to view the latest statistics. Configure a CloudWatch alarm to send an SQS notification to the support team if the average transaction completion time exceeds three seconds for one minute or longer.

c)

Install and configure the Amazon CloudWatch agent on the EC2 instances to send operating system metric data to CloudWatch. Use a metric filter based on transaction completion time, and create a CloudWatch dashboard based on the metric to view the latest statistics. Configure a CloudWatch alarm to send an SNS notification to the support team if the average transaction completion time exceeds three seconds for one minute or longer.

d)

Configure the application to record transaction completion times to an application log file. Install and configure the CloudWatch agent on the EC2 instances, and send the application log to CloudWatch Logs. Use a metric filter based on transaction completion time, and create a CloudWatch dashboard based on the metric to view the latest statistics. Configure a CloudWatch alarm to send an SNS notification to the support team if the average transaction completion time exceeds three seconds for one minute or longer.

6.

You are developing a healthy-eating application that tracks nutrition and water intake on a daily basis. Your users mainly access the application using a mobile device like a cell phone or tablet. You are planning to run a promotion to attract new users by providing a free trial period, and you would like to make it easy for guest users to trial your application. Which of the following can you use to configure access for guest users?

a)

Identity federation with SAML

b)

Cognito identity pools

c)

IAM user pools

d)

Identity federation with AWS

7.

You are designing a high-performance, low-latency application that needs super fast database read and write performance. The CTO has requested that you implement a solution that can deliver microsecond read and single-digit millisecond write latency for database operations. Your dataset is currently 25 TB and is not expected to increase in size beyond 60 TB. Which of the following solutions would you suggest?

a)

Store the entire dataset in MemoryDB for Redis.

b)

Store frequently accessed data in ElastiCache for Memcached.

c)

Implement RDS Proxy and use connection pooling to reduce latency for database operations.

d)

Store the entire dataset in ElastiCache for Redis.

8.

A developer is making changes to the CloudFormation template used to deploy an application. They would like to know if any existing resources will be deleted or replaced before applying the template updates. What service feature will enable this?

a)

CloudFormation change sets

b)

CloudFormation rolling updates

c)

CloudFormation registry

d)

CloudFormation StackSets

9.

You are using CloudFront to serve static website content to users based in multiple locations across the USA, Africa, India, and the Middle East. You recently made some significant updates to the website, but users are complaining that they can only see the original content. What can you do to make sure the latest version of the website is being served by CloudFront?

a)

Invalidate the file from the CloudFront edge caches.

b)

Update the file in the original location and reset the cache timestamp.

c)

Wait for the cache to expire.

d)

Delete the file from the original location and replace it with a new version.

10.

When developing and testing a Lambda function, you would like to email a copy of the invocation record of any failed Lambda invocations to the support team so that they can investigate. Which of the following options would you recommend?

a)

Configure an SNS topic and subscribe the support team email address to the SNS topic. Configure a CloudWatch alarm to send any failed invocation records to the SNS topic.

b)

Configure an SQS queue as a Lambda dead letter queue to receive details of the failed invocations and subscribe the support team email address to the SQS queue.

c)

Configure an SNS topic as a destination for failed invocations and subscribe the support team email address to the SNS topic.

d)

Configure an SNS topic and subscribe the support team email address to the SNS topic. Configure an SQS queue as a Lambda dead letter queue to receive details of the failed invocations. Have the SNS topic poll the queue periodically and email the support team with details of any failed invocations.

11.

You have multiple applications running on a large number of EC2 instances. You need to access the application logs from a single central location. What should you do?

a)

Configure CloudWatch custom metrics.

b)

Write a script to send the application logs to CloudWatch. Install the script on each of your application servers.

c)

Configure the CloudWatch agent to send the application logs to CloudTrail logs.

d)

Configure the CloudWatch agent to send the application logs to CloudWatch Logs.

12.

You are working on a flight booking application that runs on a number of EC2 instances. Recently, one of your servers crashed, which meant all of your users lost their sessions and had to log in again. Many of your customers have complained that they had to start their session again from the beginning because your application does not store session state anywhere. Which of the following could you use to persist session state and prevent this from happening?

a)

DynamoDB

b)

S3

c)

Elastic Block Storage

d)

S3 Glacier

13.

You are adding sign-in functionality to a web application running in AWS. After users have successfully signed in to your application, they need the ability to update their contact details and other user profile data that is stored in a DynamoDB table. Which of the following is the easiest way to provide this functionality?

a)

Use a Cognito user pool to provide sign-in functionality. Use a Cognito identity pool and an IAM role to define permission to read and write to the DynamoDB table.

b)

Use AWS SAM to provide sign-in functionality, store database credentials in Secrets Manager, and have your code reference the Secrets Manager API in order to read and write to the DynamoDB table.

c)

Use Cognito to provide sign-up and sign-in functionality. Use a resource- based policy to enable read and write access to the DynamoDB table.

d)

Use a Cognito identity pool to provide sign-in functionality. Use a Cognito user pool and an IAM role to define permission to read and write to the DynamoDB table.

14.

A developer needs to compile Java code to produce a deployment artifact. Which Amazon service can the developer use for this task?

a)

CodeDeploy

b)

CodeCommit

c)

CodeBuild

d)

CodePipeline

15.

You are developing a new application using Lambda, API Gateway, S3 and DynamoDB. You would like to record information about incoming and outgoing HTTP requests, as well as latency incurred by each component. You have multiple versions of the application to cater for your development, UAT, performance test, and production environments. What is the most efficient way to collect this information and group it according to which environment it relates to?

a)

Use CloudWatch to view the information, and configure annotations to indicate to which environment the traces relate. Group the data according to environment.

b)

Use X-Ray to view the information, and configure annotations to indicate to which environment the traces relate. Group the data according to environment.

c)

Use CloudTrail to view the information, and configure annotations to indicate to which environment the traces relate. Group the data according to environment.

d)


Use CloudFormation to view the information, and configure annotations to indicate to which environment the traces relate. Group the data according to environment.

16.

You work for a health insurance company that is storing large amounts of customer data in an S3 bucket. Many of the files that are being stored are customer contracts that include client bank details, addresses, and social security numbers. A new head of security has requested that you find a solution to identify files containing personally identifiable information (PII) and ensure that the files are encrypted using an encryption key that is owned and administered by the security team and automatically rotated on an annual basis. Which of the following solutions do you recommend?

a)

Use Macie to identify personally identifiable information. Use S3 default encryption to encrypt the files, with automatic rotation enabled for the KMS key.

b)

Use Macie to identify personally identifiable information. Create an SSE-KMS key that is administered by the security team. Create an EventBridge rule to trigger a Lambda function that rotates the encryption key on an annual basis. Encrypt the files using SSE-KMS.

c)

Use Macie to identify personally identifiable information. Create an SSE-KMS key that is administered by the security team, and enable automatic rotation for the KMS key. Encrypt the files using SSE-KMS.

d)

Create a new SSE-C encryption key in KMS using imported key material supplied by the security team. Create a Lambda function to scan the files and identify personally identifiable information that is stored in S3, and trigger another function to encrypt the data using the SSE-C key. Configure automatic key rotation in KMS.

17.

A developer is configuring CodeDeploy to deploy an application to an EC2 instance. The application's source code is stored within AWS CodeCommit.

How do you need to set up and configure your IAM policy to allow CodeDeploy to perform the deployment to EC2?

a)

Create an IAM policy with an action to allow codecommit:GitPull on the required repository. Attach the policy to the EC2 instance profile role.

b)

Create an IAM policy with an action to allow codecommit:GitPull on the required repository. Attach the policy to the CodeCommit service role.

c)

Create an IAM policy with an action to allow codecommit:GitPull on the required repository. Attach the policy to the CodeDeploy service role.

d)

Create an IAM policy with an action to allow codecommit:GitPull on the required repository. Attach the policy to your IAM user.

18.

An organization wishes to use Amazon Simple Queue Service (SQS) as a job queue. There is no requirement that jobs have to be processed in the order in which they are added to the queue; however, duplicate jobs must not appear in the queue. How could these requirements be met most efficiently?

a)

Use DynamoDB to track what jobs are in the queue. Check DynamoDB before adding a new job to the queue to ensure it is not a duplicate.

b)

Implement a standard SQS queue.

c)

Implement a First-In-First-Out (FIFO) queue in SQS.

d)

Lock messages once they are added to the queue to prevent duplicates from being added.

19.

You are designing a new web application and need to use services that allow you to reduce latency and retrieve information faster. Which of the following options could you use in this situation?

(Choose2)

a)

DynamoDB

b)

CloudFront

c)

X-Ray

d)

ElastiCache

20.

You have deployed your application on EC2 using Elastic Beanstalk. You would like to configure your application to send data to X-Ray. Where should you install the X-Ray daemon?

a)

Install the X-Ray daemon on the EC2 instances located in your own data center.

b)

Manually provision a new EC2 instance and install the X-Ray daemon on the new instance.

c)

Install the X-Ray daemon on the EC2 instances inside your Elastic Beanstalk environment.

d)

Install the X-Ray daemon on a Docker container running on your EC2 instance.

21.

You have some sensitive data that you would like to encrypt. You want to be sure that once the data is encrypted, nobody but you will be able to use the encryption key to decrypt your files. Your head of security has asked you to make sure that the key used to encrypt your files is itself encrypted under another key. How can you accomplish this on AWS?

a)

Store the encryption keys in CloudHSM.

b)

Store the encryption key in an encrypted S3 bucket.

c)

Encrypt the master key with the data key.

d)

Re-encrypt the data key with the master key.

e)

Use envelope encryption to encrypt the data key with another key.

22.

Your application is using Kinesis to ingest data from a number of environmental sensors that continuously monitor for pollution within a one-mile radius of a local primary school. An EC2 instance consumes the data from the stream using the Kinesis Client Library (KCL). You have recently increased the number of shards in your stream to six, and your project manager is now suggesting that you need to add at least six additional EC2 instances to cope with the new shards. What would be your response to this suggestion?

a)

You should increase the number of instances to match the number of shards.

b)

One worker can process any number of shards, so it's fine if the number of shards exceeds the number of instances.

c)

You should decrease the number of shards to match the number of consumer instances.

d)

The number of instances should be greater than the number of shards.

23.

You need to retrieve some data from your DynamoDB table. Which of the following methods would consume the least provisioned capacity units?

a)

A Query request with eventual consistency.

b)

A Scan operation with strong consistency.

c)

A Scan operation with eventual consistency.

d)

A Query request with strong consistency.

24.

You are developing a Lambda function written in Python that uploads a number of sensitive files to S3. The application architect has told you to use client-side encryption to protect the files. How can you do this?

a)

Encrypt the files using the AWS Encryption SDK.

b)

Select the Encryption checkbox in the Lambda console.

c)

Encrypt your local root disk before uploading the files.

d)

Select S3 default encryption.

e)

Use SSL to upload the files.

25.

You are supporting a legacy application that runs on a virtual machine running RedHat Linux in your own data center. Your CTO asks you to ensure that all RedHat instances in the legacy data center are monitored using CloudWatch. You also need to ensure that the support team is notified by email if an error message appears in the application log file. Which of the following do you recommend?

a)

Install the CloudWatch agent on the Linux servers. Configure the agent to monitor the application log file. Use a CloudWatch alarm to trigger an SNS notification if an error appears in the application log file.

b)

Configure a Lambda function that periodically connects to the application servers and monitors the application log file. Use a CloudWatch alarm to trigger an SNS notification if an error appears in the application log file.

c)

Update your application code to send application log data to CloudWatch logs. Use a CloudWatch alarm to trigger an SNS notification if an error appears in the application log file.

d)

Install the CloudWatch agent on the Linux servers. Configure the agent to monitor the operating system messages file. Use a CloudWatch alarm to trigger an SNS notification if an error appears in the messages file.

26.

A company is developing its first Lambda function. The function needs access to their existing EC2 instances, which are all hosted in private subnets within a custom VPC. What must the company do to ensure their function can access the EC2 instances?

(Choose3)

a)

Configure the Lambda execution role to have permissions for managing an ENI within the VPC.

b)

Configure the Lambda's execution role to match the role applied to your EC2 instances.

c)

Configure the Lambda function to connect to the private subnets used by the EC2 instances using security group configuration.

d)

Configure the Lambda's security group so it has access to the EC2 instances.

e)

Configure the Lambda's function policy to allow EC2 to invoke the function.

27.

You need a central place to store environment parameters like environment variables, database connection strings, and license keys so that they can be shared by multiple applications running on EC2. Which of the following is the best approach so that this data is stored centrally and the applications can access it securely and reference it easily?

a)

Use Parameter Store for the environment variables and reference the parameters in the application code.

b)

Use DynamoDB to store the environment variables and reference the primary key of the parameters in the application code.

c)

Use API Gateway stage variables and reference the stage variables in the application code.

d)

Use Lambda environment variables and reference the environment variables in the application code.

28.

You are designing an application that handles online credit card applications. It will have a number of web and application servers running on EC2, customer reference data stored in S3, and transactional data stored in RDS. The security team advised that a lot of sensitive customer information will be stored in S3, and you have been asked to make sure that all new objects are encrypted at rest to protect the data when they are stored in the bucket. How can you do this?

a)

Use SSL to upload the files.

b)

Encrypt your local root disk before uploading the files.

c)

Use default encryption on your S3 bucket.

d)

Encrypt the files locally using the AWS Encryption SDK.

29.

Your dental appointment booking application runs in AWS and processes appointment data held in a DynamoDB table. When an appointment data is added or modified in DynamoDB, you would like to process the data in real time before storing the processed information about each appointment in S3. Which of the following solutions should you implement?

a)

Configure a CloudWatch Events rule to monitor the Lambda function and trigger it when an item is added or modified. The Lambda function will process the data and then save the results to S3.

b)


Configure a CloudWatch alarm to monitor the DynamoDB table and trigger a Lambda function when an item is added or modified. The Lambda function will process the data and then save the results to S3.

c)


Use DynamoDB Streams to capture all the data modifications that occur in the DynamoDB table, and trigger a Lambda function when an item is added or modified. The Lambda function will process the data and then save the results to S3.

d)

Create a Lambda function to monitor the DynamoDB table and send a message to an SQS queue when an item is added or modified. After the message is created, use another Lambda function to periodically check for messages in the queue, process the data, and then save the results to S3.

30.

Your application interacts with an RDS database for storing customer data relating to your online gaming application. You have noticed that during times of intensive read activity, the database and whole application slows down, causing customers to complain. Which of the following could you implement to improve performance?

(Choose 2)

a)

Add a DynamoDB Accelerator (DAX) cluster to improve performance for read queries. Point the application servers to the DAX cluster.

b)

Add an ElastiCache cluster to improve performance for read queries. Point the application servers to the ElastiCache cluster.

c)

Move the dataset to DynamoDB for faster response times.

d)

Add a read replica to improve performance for read queries. Point the application servers to the read replica.

e)

Add a MemoryDB for Redis instance to improve performance for read queries. Point the application servers to MemoryDB for Redis.

31.

Following a major security breach, the head of security at your company has requested that all AMIs that are in use must be encrypted, and anyone using an unencrypted AMI will be reprimanded. You have been asked to perform an audit of all the custom AMIs that exist in your account and ensure that they are all encrypted. While investigating, you discover 5 unencrypted AMIs that are needed to scale the company’s mission-critical applications. Which of the following actions should you take?

a)

For each of the unencrypted AMIs, select the AMI and select encryption, then save the AMI.

b)

Create a new encryption key using KMS; use the key to encrypt the AMI.

c)

Configure default encryption in your AWS account to encrypt the unencrypted AMIs.

d)

For each of the unencrypted AMIs, copy the AMI and specify encryption before creating the copy. Delete the original unencrypted AMIs.

32.

Your application is using Kinesis to ingest clickstream data relating to your products from a variety of social media sites. Your company has been trending this quarter because a high-profile movie star has recently signed a contract to endorse your products. As a result, the amount of data flowing through Kinesis has increased, requiring you to increase the number of shards in your stream from four to six. The application consuming the data runs on a single EC2 instance in an Auto Scaling group in us-east-1a. How many consumer instances will you now need in total to cope with the increased number of shards?

a)

Three instances in us-east-1a and three instances in us-east-1b.

b)

One instance in us-east-1a and one instance in us-east-1b.

c)

Six instances in us-east-1a and one instance in us-east-1b.

d)

Six instances in us-east-1a and six instances in us-east-1b.

33.

A clothing company needs to build a REST service to allow salespeople quick access to stock levels. The service must be accessible from an HTTP request. Which of the following services would best help the company to implement the solution without spending time provisioning and managing servers?

a)

Amazon EC2 and AWS Auto Scaling

b)

Amazon SQS and Amazon DynamoDB

c)

Amazon API Gateway and AWS Lambda

d)

Amazon CloudFront and Amazon S3

34.

You are developing an online hotel booking application that makes a number of requests to different backend applications to get quotes for travel-related add-on services. You are using API Gateway to handle all the API calls, and you notice that the majority of requests are for the same five or six services. How can you most simply optimize the configuration to ensure the best performance for your application?

a)

Configure Auto Scaling for the API Gateway.

b)

Implement API caching to cache the endpoint's response for the most popular requests.

c)

Configure a CloudFront CDN in front of API Gateway to cache the most frequent HTTP requests.

d)

Add an ElastiCache cluster in front of your database to cache the most frequently accessed data.

35.

You are developing a new application that allows users to search for parking spots in their local area. Your application is based on Lambda and uses API Gateway to connect to third-party parking lot companies to access information about parking fees and availability. Your application stores session data in a DynamoDB table; however, you would like to automatically delete the session data from the table once the user session has expired and the data is no longer relevant to help keep costs to a minimum. How can you most easily achieve this?

a)

Configure a Time To Live (TTL) based on the session expiry time.

b)

Use SNS to send a notification when the session data expires and then configure API Gateway to remove the unwanted data.

c)

Use DynamoDB Streams to prune the table and remove any unwanted data.

d)

Write a Lambda function to continually poll the table to check if the session data has expired and then delete the item from the table.

36.

What is the name of the SAM template property that defines the point in a Lambda function's code where execution begins?

a)

Source

b)

Runtime

c)

Index

d)

Handler

37.

An organization has mandated that all files stored in their newly created S3 bucket, top-secret-documents, must be encrypted using a customer master key stored in KMS. Which of the following could be used to enforce this requirement?

a)

Enable S3 default encryption and select AWS-KMS.

b)

Add a bucket policy that denies PUT operations that don't contain the HTTP header x-amz-server-side-encryption: aws:kms.

c)

Add a bucket policy that denies PUT operations that don't contain the HTTP header x-amz-server-side-encryption: SSE:C.

d)

Add a bucket policy that denies PUT operations that don't contain the HTTP header x-amz-server-side-encryption: AES256.

38.

A three-tier web application has been deployed using a CloudFormation template. How can the CloudFormation developer ensure that the database resource is saved for backup purposes upon stack deletion?

a)

Set DeletionProtection to True in the CloudFormation template.

b)

Set Stack Termination Protection to Enable.

c)

Set the DeletionPolicy to Retain in the CloudFormation template.

d)

Create an IAM policy with an Action for cloudformation:DeleteStack and set its Effect to Deny.

39.

You are deploying a number of Lambda functions using CloudFormation. Which section of the CloudFormation template should you use to define your Lambda resources?

a)

Resources

b)

Mappings

c)

Outputs

d)

Parameters

40.

Your application is running on EC2 and on Linux virtual machines in your own data center. You would like to configure your application to send data to X-Ray for troubleshooting and performance analysis. Which of the following steps will you need to complete?

a)

Install the X-Ray SDK and the X-Ray daemon, then instrument your application to send data to X-Ray.

b)

Install the X-Ray daemon, then instrument your application to send data to X-Ray.

c)

Install the AWS SDK and the X-Ray CLI, then instrument your application to send data to X-Ray.

d)

Install the AWS CLI, then instrument your application to send data to X-Ray.

41.

A developer has a requirement to trigger a Lambda function once every 24 hours. What is the best way of achieving this requirement?

a)

Schedule the trigger in the Lambda runtime scheduler.

b)

Schedule a trigger using EventBridge.

c)

Invoke the Lambda function from a cron job running on an EC2 instance.

d)

Add a message into SQS that invokes the Lambda function. As part of the Lambda function's code, add a new message in SQS to re-invoke the function with DelaySeconds set to 24 hours.

42.

A developer is implementing an IoT application using DynamoDB as the data store for device event data. An application requirement is to automatically purge all event data older than 30 days. What is the optimal option to implement this requirement?

a)

Enable DynamoDB streams on the table. Implement a Lambda function to read events from the stream and delete expired items.

b)

Implement a Lambda function to perform a query on the table and delete items with a timestamp greater than 30 days. Use CloudWatch Events to trigger the Lambda function.

c)

Create a new DynamoDB table every 30 days. Delete the old DynamoDB table.

d)


Enable Time to Live (TTL) on the DynamoDB table and store the expiration timestamp in the TTL attribute in the epoch time format.

43.

Your application is performing poorly. Upon investigating, the application support team discovers that latency is being incurred each time the application opens and closes connections to an RDS database. The enterprise architecture team is concerned that the current architecture is not scalable and have asked if there is a way to keep connections open to avoid the overhead of opening and closing connections each time. Which of the following would you recommend?

a)

Use DynamoDB Accelerator to cache frequently accessed queries.

b)

Add a read replica to improve database read performance.

c)

Use RDS Proxy to provide connection pooling so that database connections can be reused, instead of re-establishing them each time.

d)


Use ElastiCache to cache frequently accessed queries.

44.

Your application runs on Lambda and EC2, with HTTP requests being routed and processed by API Gateway. You have been asked to modify the HTTP headers for each request received by API Gateway so that you can properly track the requests and correlate all requests with your application logs. Which of the following can be used to modify the HTTP request header for requests that are processed by API Gateway?

a)

Use staging variables with a request transformation to change the HTTP header.

b)

Use staging variables with a response transformation to change the HTTP header.

c)


Use parameter mapping with a response transformation to change the HTTP header.

d)

Use parameter mapping with a request transformation to change the HTTP header.

45.

Your EC2 instance needs to access a number of files that have been encrypted using KMS. Which of the following must be configured in order for the EC2 instance to successfully read the files?

(Choose2)

a)

The IAM user associated with the application must have a role that has permission to run the decrypt operation.

b)

The EC2 instance must have an instance role that has permission to run the decrypt operation.

c)

The key policy must allow the instance role to use the CMK.

d)

The key policy must allow the IAM user to use the CMK.

46.

You are developing a website which allows customers to purchase tickets to popular sporting events. Your application uses S3 for static web hosting, Lambda for business logic, RDS to store transaction data, and DynamoDB for product and stock information. After the customer has paid for their purchase, a message is sent to an SQS queue to trigger a confirmation email to be sent out to the customer including an e-ticket for their chosen event. You want to send out the email as soon as the payment has been processed; however, during testing, you discover that the confirmation emails are being processed a few seconds before the stock control database has finished updating. This sometimes results in selling the same ticket twice. How can you quickly fix this without re-engineering the application?

a)

Use Kinesis to stream the SQS messages, adding a delay of a few seconds.

b)

Modify the SQS queue to become a delay queue by setting the delivery delay to 5 seconds. This will allow the database to update before the confirmation emails are processed.

c)

Use a First-In-First-Out (FIFO) queue to ensure the messages are always processed in the correct order.

d)

Refactor the application to append a message timer to events as they are sent to the SQS queue. Set the message timer's DelaySeconds parameter to 5. This will allow the database to update before the confirmation emails are processed.

47.

A mission-critical application stores sensitive customer data in an RDS cluster in a private subnet in your VPC. Following a recent security audit, it has been discovered that the database password has not been changed for over 2 years. Your head of security has requested that you find a solution to automatically rotate the database password. In order to resolve the audit finding, you immediately change the database password; however, after changing the password, you receive a number of alerts from applications that can no longer access the database. Which of the following solutions should you implement to handle the database password rotation in a way that allows applications to continue to connect to the database?

a)

Use Secrets Manager to rotate the password, and update the application code to reference the secret instead of hardcoding database credentials.

b)


In the RDS configuration settings, select the password rotation option, and create a Lambda function to update the application code after each password rotation.

c)

Use Parameter Store to rotate the password as a secure string. Update the application code to reference the parameter instead of hardcoding database credentials.

d)

Create a Lambda function to rotate the password, and update the application code to reference a Lambda environment variable instead of hardcoding database credentials.

48.

You are testing a new serverless application that uses Lambda, S3, DynamoDB and API Gateway. You are suddenly seeing a large number of 4XX HTTP response codes coming from API Gateway. What could be the problem, and what should you do about this?

a)

This is an AWS error. You should wait for AWS to fix the issue and retry the request.

b)

This indicates an internal problem with your API Gateway instance. Provision a new API Gateway instance and try the request again.

c)

This is a client error. You should fix the issue in your application and retry the request.

d)

This indicates an internal problem with your API. Fix the issue in your API and try the request again.

49.

A developer notices that recently the performance of a web application has seriously declined. The application is running on AWS services and consists of a number of different microservices. Which of the following should the developer use to identify which service or services are contributing the most to the performance issue?

a)

Use the X-Ray service map to view the average latency between the services that make up the application.

b)


Write a Lambda function to build a service map to view the average latency between the services that make up the application.

c)

Use the CloudWatch dashboard to view a map of the average latency between the services that make up the application.

d)


Have the application components report latency times to an application log and send the data to CloudTrail. Create a dashboard based on CloudTrail log data to report on the average latency between each of the application components.

50.

A developer is working on a new application that will use DynamoDB. One of the DynamoDB tables that the developer must create requires an index sort key. When creating this DynamoDB table, the developer must select an attribute type for the sort key. Which of the following DynamoDB data types can the developer use for their index sort key?

(Choose3)

a)

Boolean

b)

List

c)

String

d)

Number

e)

Binary

51.

A developer is implementing a solution that must leverage a service for messaging-oriented applications, with multiple subscribers requesting and receiving push notifications of time-critical messages via a choice of transport protocols, including HTTP, Amazon SQS, and email. Which AWS service is the best option for implementing this functionality?

a)

Amazon SNS

b)

Amazon SES

c)

Amazon SQS

d)

Amazon WorkMail

52.

You are working for an investment bank and have been asked to help the application support team with their annual disaster recovery testing. The main production PostgreSQL database is hosted in a RDS Multi-AZ deployment, with multiple applications running on a combination of EC2 and Lambda. You have been asked to help the team demonstrate the impact that a failed Availability Zone (AZ) will have on the database. Which of the following would you suggest?

a)

Simulate an AZ failure by performing a reboot with forced failover on the RDS instance.

b)

Simulate an AZ failure by rebooting the underlying EC2 instance that is running the database.

c)

Simulate an AZ failure by moving your RDS instance to a different subnet.

d)


Simulate an AZ failure by disconnecting your RDS instance from the network.

e)

Simulate an AZ failure by deleting the primary RDS instance.

53.

You are developing a Lambda function that needs to read items from a DynamoDB table. After creating and testing the function, you notice that it throws Permission Denied errors. Which of the following should you do to ensure that your function is able to successfully access the DynamoDB table?

a)

Create an IAM access policy to grant the required permissions to access the DynamoDB table. Attach the policy to the execution role of the function.

b)

Create an IAM user with the required permissions to access the DynamoDB table. Attach the user to the execution role of the function.

c)

Create an IAM group with the required permissions to access the DynamoDB table. Associate the IAM group with the Lambda function.

d)

Create an IAM access policy to grant the required permissions to access the DynamoDB table. Attach the policy to identity pool of the function.

54.

Your application can be accessed using multiple devices, for example, laptop, tablet, iPhone, or Android devices. You would like to be able to identify and track when your users access your site using different devices. Which of the following is the most efficient approach to fulfilling this requirement?

a)

Use Cognito.

b)

Store a unique session ID in DynamoDB.

c)

Store a unique session ID in ElastiCache.

d)

Use a Lambda function to store a unique device ID in DynamoDB and associate it with the user session ID.

e)

Create a unique user ID and associate it with the device metadata.

55.

Your application is experiencing a large number of failed requests when making calls to the S3 API. Which of the following best describes the approach used by AWS SDKs for regulating flow control when retrying failed API requests?

a)

Exponential backoff is used to manage error retries.

b)

Bandwidth throttling is used to manage flow control.

c)

Feedback-based flow control is used to avoid contention when retrying failed requests.

d)

By default, the request is continuously retried until it is successful.

56.

You are working on a serverless application written in Node.js. You have updated the Node.js code and uploaded a new zip file containing your code to Lambda. Your application references the function using the alias Prod; however, it does not seem to be using the new code. Which of the following is likely to fix this?

a)

You need to update your application to use an unqualified ARN.

b)

You need to update the Prod alias to reference the new version of your function.

c)

You need to call the function using $LATEST.

d)

You need to call the new version of the function.

57.

You have an application running on multiple EC2 instances; however, every time an instance fails, your users complain that they lose their session. What can you do to prevent this from happening?

a)

Store session state on the Elastic Load Balancer.

b)

Store session state on a dedicated EC2 instance.

c)

Store session state in Amazon ElastiCache, then disable sticky sessions.

d)

Store session state in Amazon RDS.

e)

Store session state in S3.

58.

You are responsible for a number of different applications that are hosted across multiple Regions. You would like to use CloudWatch to view all system metrics data in one place. Which of the following approaches should you choose?

a)

Create a different dashboard for each resource type on a regional basis.

b)

Create a single dashboard to cover all the Regions and include metrics for each application.

c)

Create a dashboard for each Region, and group the applications together on a regional basis.

d)

Create a dashboard to cover all the applications and use a separate namespace for each Region.

59.

You are running an online fitness tracker application on a number of EC2 instances behind an Elastic Load Balancer. You have noticed some anomalies with the way the application is performing lately and would like to collect the application logs from all of your application servers into one central location. Which of the following will you need to do for each instance?

(Choose2)

a)

Ensure the CloudWatch agent is installed and running on your EC2 instance.

b)

Ensure the instance role associated with your EC2 instance has read permission for CloudWatch.

c)

Ensure the instance role associated with your EC2 instance has permission to write the application logs to CloudWatch.

d)

Ensure the instance role associated with your EC2 instance has permission to write the application logs to S3.

e)

Ensure the CloudWatch agent has permission to write the application log files on your EC2 instance.

60.

You are developing a serverless application and you need somewhere to persist user state data. Which of the following would you recommend?

a)

DynamoDB

b)

API Gateway

c)

Serverless Application Model

d)

Lambda ephemeral storage

61.

You are developing a web application that has been deployed using Lambda. Today, you updated the code and uploaded the new version of your code to the Lambda console. Your test team has begun their testing, and has reported that the application seems to still be using the original code. What could be the reason for this?

(Choose 3)

a)

Your application is referencing the function using a qualified ARN which is pointing to the previous version of the code.

b)

Your application is referencing the function using $LATEST.

c)

Your application is referencing the function using an unqualified ARN.

d)

Your application is referencing the function using an alias that points to a previous version of the code.

e)

You forgot to publish the new version of your function.

62.

Following a suspected security breach, you need to review the CloudTrail logs to identify any API calls that were made by the cloud_user IAM account over the past 48 hours. Which of the following is the best approach to identifying the API calls performed by this account?

a)


Use a MySQL client to perform an SQL query on the CloudTrail data stored in S3 to identify API calls that were performed by the user.

b)

Use Athena to perform a SQL query on the CloudTrail data stored in S3 to identify API calls that were performed by the user.

c)

Import the CloudTrail data to a DynamoDB table using the BatchPutItem. Perform a DynamoDB query to identify API calls that were performed by the user.

d)

Use Macie to identify API calls that were performed by the user.

63.

An organization wishes to use CodeDeploy to automate its application deployments. The organization has asked a developer to advise on which of their services can integrate with CodeDeploy. Which of the following services can the developer advise are compatible with CodeDeploy-managed deployments?

(Choose4)

a)

S3 static website hosting

b)

ECS Fargate

c)

On-premises servers

d)

Lambda

e)

EC2

64.

You are trying to use CodeDeploy to deploy the latest version of your application that is stored in S3. You are trying to deploy the code to a new EC2 instance for the very first time. However, the deployment keeps failing with an IAM_ROLE_PERMISSIONS error. Other team members have been able to successfully run the deployment to other EC2 instances, and you suspect that your instance may not have permission to access the code in the S3 bucket. Which of the following can you use to test whether the instance role allows your EC2 instance to get the code from S3?

a)

Use Trusted Advisor to check whether the instance role allows access.

b)

Check the IAM logs to see whether the instance role allows access.

c)

Use the IAM policy simulator to test whether the instance role allows access.

d)

Use the console to check the public access permission on the S3 bucket and enable it if it is set to false.

65.

Your company currently uses a UserData script to install security patches when an EC2 instance is launched; however, some teams have complained that the UserData script takes too long to complete, which is causing problems with auto scaling events. You have been asked to create a new custom AMI based on the latest version of Amazon Linux, and with the latest security patches included. Which of the following is the most efficient approach?

a)


Use an existing AMI and select the option to apply the latest security patches when instances are launched.

b)

Create a new AMI based on the latest version of Amazon Linux using Image Builder. Include the latest security patches in the image.

c)

Update an existing Amazon Linux AMI with the latest security patches.

d)

Create an EC2 instance and manually add all the security patches. Then, take a snapshot of the EC2 instance. Use the snapshot to build a new AMI.