wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AWS Dev

Total questions: 60

Worksheet time: 3hrs 46mins

Name
Class
Date
1.

A gaming website gives users the ability to trade game items with each other on the platform. The platform requires both users' records to be updated and persisted in one transaction. If any update fails, the transaction must roll back.
Which AWS solution can provide the transactional capability that is required for this feature?

a)

Amazon DynamoDB with operations made with the Consistent Read parameter set to true

b)

Amazon ElastiCache for Memcached with operations made within a transaction block

c)

Amazon DynamoDB with reads and writes made by using Transact* operations

d)

Amazon Aurora MySQL with operations made within a transaction block

e)

Amazon Athena with operations made within a transaction block

2.

A developer has created a Java application that makes HTTP requests directly to AWS services. Application logging shows 5xx HTTP response codes that occur at irregular intervals. The errors are affecting users.
How should the developer update the application to improve the application's resiliency?

a)

Revise the request content in the application code.

b)

Use the AWS SDK for Java to interact with AWS APIs.

c)

Scale out the application so that more instances of the application are running.

d)

Add additional logging to the application code.

3.

A global company has a mobile app with static data stored in an Amazon S3 bucket in the us-east-1 Region. The company serves the content through an Amazon
CloudFront distribution. The company is launching the mobile app in South Africa. The data must reside in the af-south-1 Region. The company does not want to deploy a specific mobile client for South Africa.
What should the company do to meet these requirements?

a)

Use the CloudFront geographic restriction feature to block access to users in South Africa.

b)

Create a Lambda@Edge function. Associate the Lambda@Edge function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.

c)

Create a Lambda@Edge function. Associate the Lambda@Edge function as a viewer response trigger with the CloudFront distribution to change the S3 origin Region.

d)

Include af-south-1 in the alternate domain name (CNAME) of the CloudFront distribution.

4.

A developer is testing an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM) local CLI. The application that is implemented by the
Lambda function makes several AWS API calls by using the AWS software development kit (SDK). The developer wants to allow the function to make AWS API calls in a test AWS account from the developer's laptop.
What should the developer do to meet these requirements?

a)

Edit the template.yml file. Add the AWS_ACCESS_KEY_ID property and the AWS_SECRET_ACCESS_KEY property in the Globals section.

b)

Add a test profile by using the aws configure command with the --profile option. Run AWS SAM by using the sam local invoke command with the -profile option.

c)

Edit the template.yml tile. For the AWS::Serverless::Function resource, set the role to an IAM role in the AWS account.

d)

Run the function by using the sam local invoke command. Override the AWS_ACCESS_KEY_ID parameter and the AWS_SECRET_ACCESS_KEY parameter by specifying the --parameter-overrides option.

5.

A developer designed an application on an Amazon EC2 instance. The application makes API requests to objects in an Amazon S3 bucket.
Which combination of steps will ensure that the application makes the API requests in the MOST secure manner? (Choose two.)

a)

Create an IAM user that has permissions to the S3 bucket. Add the user to an IAM group.

b)

Create an IAM role that has permissions to the S3 bucket.

c)

Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.

d)

Create an IAM role that has permissions to the S3 bucket. Assign the role to an 1AM group.

e)

Store the credentials of the IAM user in the environment variables on the EC2 instance.

6.

A developer is configuring an Amazon CloudFront distribution for a new application to provide encryption in transit. The application is running in the eu-west-1
Region. The developer creates a new certificate in AWS Certificate Manager (ACM) in eu-west-1, but the certificate is not visible in the CloudFront distribution settings.
What should the developer do to fix this problem?

a)

Create the certificate for the domain in the same Region as the application. Ensure that the alternate domain name (CNAME) in the distribution settings matches the domain name in the certificate.

b)

Create the certificate in the eu-west-1 Region. Ensure that the alternate domain name (CNAME) in the distribution settings matches the domain name in the certificate.

c)

Recreate the CloudFront distribution in the same Region as the certificate.

d)

Specify the ACM certificate name as the default root object of the CloudFront distribution.

7.

A developer is building an application that runs behind an Application Load Balancer (ALB). The ALB is configured as the origin for an Amazon CloudFront distribution. Users will log in to the application by using their social media accounts.
How can the developer authenticate users?

a)

Validate the users by inspecting the tokens in an AWS Lambda authorizer on the ALB.

b)

Configure the ALB to use Amazon Cognito as one of the authentication providers.

c)

Configure CloudFront to use Amazon Cognito as one of the authentication providers.

d)

Validate the users by calling the Amazon Cognito API in an AWS Lambda authorizer on the ALB.

8.

A company has an application that analyzes photographs. A developer is preparing the application for deployment to Amazon EC2 instances. The application's image analysis functions require a mix of GPU instances and CPU instances that run on Amazon Linux. The developer needs to add code to the application so that the functions can determine whether they are running on a GPU instance.
What should the functions do to obtain this information?

a)

Call the DescribeInstances API operation and filter on the current instance ID. Examine the ElasticGpuAssociations property.

b)

Evaluate the GPU AVAILABLE environment variable.

c)

Call the DescribeElasticGpus API operation.

d)

Retrieve the instance type from the instance metadata.

9.

A company has an application that uses Amazon Cognito user pools as an identity provider. The company must secure access to user records. The company has set up multi-factor authentication (MFA). The company also wants to send a login activity notification by email every time a user logs in.
What is the MOST operationally efficient solution that meets this requirement?

a)

Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon API Gateway API to invoke the function. Call the API from the client side when login confirmation is received.

b)

Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Add an Amazon Cognito post authentication Lambda trigger for the function.

c)

Create an AWS Lambda function that uses Amazon Simple Email Service (Amazon SES) to send the email notification. Create an Amazon CloudWatch Logs log subscription filter to invoke the function based on the login status.

d)

Configure Amazon Cognito to stream all logs to Amazon Kinesis Data Firehose. Create an AWS Lambda function to process the streamed logs and to send the email notification based on the login status of each user.

10.

A company hosts a three-tier web application on AWS behind an Amazon CloudFront distribution. A developer wants a dashboard to monitor error rates and anomalies of the CloudFront distribution with the shortest possible refresh interval.
Which combination of slops should the developer take to meet these requirements? (Choose two.)

a)

Activate real-time logs on the CloudFront distribution. Create a stream in Amazon Kinesis Data Streams.

b)

Export the CloudFront logs to an Amazon S3 bucket. Detect anomalies and error rates with Amazon QuickSight.

c)

Configure Amazon Kinesis Data Streams to deliver logs to Amazon OpenSearch Service (Amazon Elasticsearch Service). Create a dashboard in OpenSearch Dashboards (Kibana).

d)

Create Amazon CloudWatch alarms based on expected values of selected CloudWatch metrics to detect anomalies and errors.

e)

Design an Amazon CloudWatch dashboard of the selected CloudFront distribution metrics.

11.

A developer creates a customer managed key for multiple AWS users to encrypt data in Amazon S3. The developer configures Amazon Simple Notification
Service (Amazon SNS) to publish a message if key deletion is scheduled. The developer needs to preserve any SNS messages that cannot be delivered so that those messages can be reprocessed.
Which AWS service or feature should the developer use to meet this requirement?

a)

Amazon Simple Email Service (Amazon SES)

b)

AWS Lambda

c)

Amazon Simple Queue Service (Amazon SQS)

d)

Amazon CloudWatch alarm

12.

A developer needs to deploy an application to AWS Elastic Beanstalk for a company. The application consists of a single Docker image. The company's automated continuous integration and continuous delivery (CI/CD) process builds the Docker image and pushes the image to a public Docker registry.
How should the developer deploy the application to Elastic Beanstalk?

a)

Create a Dockerfile. Configure Elastic Beanstalk to build the application as a Docker image.

b)

Create a docker-compose.yml file. Use the Elastic Beanstalk CLI to deploy the application.

c)

Create a .zip file that contains the Docker image. Upload the .zip file to Elastic Beanstalk.

d)

Create a Dockerfile. Run the Elastic Beanstalk CLI eb local run command in the same directory.

13.

A company is using AWS CodeDeploy for all production deployments. A developer has an Amazon Elastic Container Service (Amazon ECS) application that uses the CodeDeployDefault.ECSAIIAtOnce configuration. The developer needs to update the production environment in increments of 10% until the entire production environment is updated.
Which CodeDeploy configuration should the developer use to meet these requirements?

a)

CodeDeployDefault.ECSCanary10Percent5Minutes

b)

CodeDeployDefault.ECSLinear10PercentEvery3Minutes

c)

CodeDeployDefault.OneAtATime

d)

CodeDeployDefault.LambdaCanary10Percent5Minutes

14.

A company is using AWS Elastic Beanstalk to deploy a three-tier application. The application uses an Amazon RDS DB instance as the database tier. The company wants to decouple the DB instance from the Elastic Beanstalk environment.
Which combination of steps should a developer lake to meet this requirement? (Choose two.)

a)

Create a new Elastic Beanstalk environment that connects to the DB instance.

b)

Create a new DB instance from a snapshot of the previous DB instance.

c)

Use the Elastic Beanstalk CLI to decouple the DB instance.

d)

Use the AWS CLI to decouple the DB instance.

e)

Modify the current Elastic Beanstalk environment to connect to the DB instance.

15.

A company has point-of-sale devices across thousands of retail shops that synchronize sales transactions with a centralized system. The system includes an
Amazon API Gateway API that exposes an AWS Lambda function. The Lambda function processes the transactions and stores the transactions in Amazon RDS for MySQL. The number of transactions increases rapidly during the day and is near zero at night.
How can a developer increase the elasticity of the system MOST cost-effectively?

a)

Migrate from Amazon RDS to Amazon Aurora MySQL. Use an Aurora Auto Scaling policy to scale road replicas based on CPU consumption.

b)

Migrate from Amazon RDS to Amazon Aurora MySQL. Use an Aurora Auto Scaling policy to scale read replicas based on the number of database connections.

c)

Create an Amazon Simple Queue Service (Amazon SQS) queue. Publish transactions to the queue. Set the queue to invoke the Lambda function. Turn on enhanced fanout for the Lambda function.

d)

Create an Amazon Simple Queue Service (Amazon SQS) queue. Publish transactions to the queue. Set the queue to invoke the Lambda function. Set the reserved concurrency of the Lambda function to be less than the number of database connections.

16.

A developer is writing an AWS Lambda function. The Lambda function needs to access items that are stored in an Amazon DynamoDB table.
What is the MOST secure way to configure this access for the Lambda function?

a)

Create an IAM user that has permissions to access the DynamoDB table. Create an access key for this user. Store the access key ID and secret access key in the Lambda function environment variables.

b)

Add a resource-based policy to the DynamoDB table to allow access from the Lambda function's IAM role.

c)

Create an IAM policy that allows access to the DynamoDB table. Attach this policy to the Lambda function's IAM role.

d)

Create a DynamoDB Accelerator (DAX) cluster. Configure the Lambda function to use the DAX duster to access the DynamoDB table.

17.

A developer is implementing user authentication and authorization for a web application that is hosted on an Amazon EC2 instance. The developer needs to ensure that the user credentials are encrypted and secure when they are stored and transmitted.
Which solution will meet these requirements?

a)

Activate web server modules for authentication and authorization on the instance. Use HTTP basic authentication for the user login.

b)

Deploy a custom authentication and authorization API over HTTP. Store the user credentials on Amazon ElastiCache for Redis.

c)

Use Amazon Cognito to configure a user pool. Use the Amazon Cognito API to authenticate and authorize the users.

d)

Create IAM users. Assign the users to different IAM groups. Use AWS Single Sign-On to authenticate and authorize each user.

18.

A company that has multiple offices uses an Amazon DynamoDB table to store employee payroll information. Item attributes consist of employee names, office identifiers, and cumulative daily hours worked The most frequently used query extracts a report of an alphabetical subset of employees for a specific office.
Which design of the DynamoDB table primary key will have the MINIMUM performance impact?

a)

Partition key on the office identifier and sort key on the employee name

b)

Partition key on the employee name and sort key on the office identifier

c)

Partition key on the employee name

d)

Partition key on the office identifier

19.

A company hosts a microservices application that uses Amazon API Gateway. AWS Lambda, Amazon Simple Queue Service (Amazon SQS), and Amazon
DynamoDB. One of the Lambda functions adds messages to an SQS FIFO queue.
When a developer checks the application logs, the developer finds a few duplicated items in a DynamoDB table. The items were inserted by another polling function that processes messages from the queue.
What is the MOST likely cause of this issue?

a)

Write operations on the DynamoDB table are being throttled.

b)

The SQS queue delivered the message to the function more than once.

c)

API Gateway duplicated the message in the SQS queue.

d)

The polling function timeout is greater than the queue visibility timeout.

20.

A development team has been using a builder server that is hosted on an Amazon EC2 instance to perform builds and deployments for the last 3 months. The
EC2 instance's instance profile uses an IAM role that contains the Administrator Access managed policy. The development team must replace that policy with a policy that provides only the required permissions.
What is the FASTEST way to create a custom 1AM policy for the EC2 instance to meet this requirement?

a)

Create a new IAM policy based on services that the build server deployed or updated in the last 3 months.

b)

Create a new IAM policy that includes all actions that AWS CloudTrail recorded for the IAM role in the last 3 months.

c)

Create a new permissions boundary policy that denies all access. Associate the permissions boundaries with the IAM role.

d)

Create a new IAM policy by using Amazon Athena to query an Amazon S3 bucket that contains AWS CloudTrail events that the IAM role performed in the last 3 months.

21.

A developer needs to write an AWS CloudFormation template on a local machine and deploy a CloudFormation stack to AWS.
What must the developer do to complete these tasks?

a)

Install the AWS CLI. Configure the AWS CLI by using an IAM user name and password.

b)

Install the AWS CLI. Configure the AWS CLI by using an SSH key.

c)

Install the AWS CLI. Configure the AWS CLI by using an IAM user access key and secret key.

d)

Install an AWS software development kit (SDK). Configure the SDK by using an X.509 certificate.

22.

A developer is working on a web application that runs on Amazon Elastic Container Service (Amazon ECS) and uses an Amazon DynamoDB table to store data.
The application performs a large number of read requests against a small set of the table data.
How can the developer improve the performance of these requests? (Choose two.)

a)

Create an Amazon ElastiCache cluster. Configure the application to cache data in the cluster.

b)

Create a DynamoDB Accelerator (DAX) cluster. Configure the application to use the DAX cluster for DynamoDB requests.

c)

Configure the application to make strongly consistent read requests against the DynamoDB table.

d)

Increase the read capacity of the DynamoDB table.

e)

Enable DynamoDB adaptive capacity.

23.

A developer needs to use Amazon DynamoDB to store customer orders. The developer's company requires all customer data to be encrypted at rest with a key that the company generates.
What should the developer do to meet these requirements?

a)

Create the DynamoDB table with encryption set to None. Code the application to use the key to decrypt the data when the application reads from the table. Code the application to use the key to encrypt the data when the application writes to the table.

b)

Store the key by using AWS Key Management Service (AWS KMS). Choose an AWS KMS customer managed key during creation of the DynamoDB table. Provide the Amazon Resource Name (ARN) of the AWS KMS key.

c)

Store the key by using AWS Key Management Service (AWS KMS). Create the DynamoDB table with default encryption. Include the kms:Encrypt parameter with the Amazon Resource Name (ARN) of the AWS KMS key when using the DynamoDB software development kit (SDK).

d)

Store the key by using AWS Key Management Service (AWS KMS). Choose an AWS KMS AWS managed key during creation of the DynamoDB table. Provide the Amazon Resource Name (ARN) of the AWS KMS key.

24.

A developer is creating a solution to track an account's Amazon S3 buckets over time. The developer has created an AWS Lambda function that will run on a schedule. The function will list the account's S3 buckets and will store the list in an Amazon DynamoDB table. The developer receives a permissions error when the developer runs the function with the AWSLambdaBasicExecutionRole AWS managed policy.
Which combination of permissions should the developer use to resolve this error? (Choose two.)

a)

Cross-account IAM role

b)

Permission for the Lambda function to list buckets in Amazon S3

c)

Permission for the Lambda function to write in DynamoDB

d)

Permission for Amazon S3 to invoke the Lambda function

e)

Permission for DynamoDB to invoke the Lambda function

25.

A company is adding items to an Amazon DynamoDB table from an AWS Lambda function that is written in Python. A developer needs to implement a solution that inserts records in the DynamoDB table and performs automatic retry when the insert fails.
Which solution meets these requirements with MINIMUM code changes?

a)

Configure the Python code to run the AWS CLI through shell to call the PutItem operation

b)

Call the PutItem operation from Python by using the DynamoDB HTTP API

c)

Queue the items in AWS Glue, which will put them into the DynamoDB table

d)

Use the AWS software development kit (SDK) for Python (boto3) to call the PutItem operation

26.

A developer is writing an AWS Lambda function. The developer wants to log key events that occur during the Lambda function and include a unique identifier to associate the events with a specific function invocation.
Which of the following will help the developer accomplish this objective?

a)

Obtain the request identifier from the Lambda context object. Architect the application to write logs to the console.

b)

Obtain the request identifier from the Lambda event object. Architect the application to write logs to a file.

c)

Obtain the request identifier from the Lambda event object. Architect the application to write logs to the console.

d)

Obtain the request identifier from the Lambda context object. Architect the application to write logs to a file.

27.

A company experienced partial downtime during the last deployment of a new application. AWS Elastic Beanstalk split the environment's Amazon EC2 instances into batches and deployed a new version one batch at a time after taking them out of service. Therefore, full capacity was not maintained during deployment.
The developer plans to release a new version of the application, and is looking for a policy that will maintain full capacity and minimize the impact of the failed deployment.
Which deployment policy should the developer use?

a)

Immutable

b)

All at Once

c)

Rolling

d)

Rolling with an Additional Batch

28.

A company is providing services to many downstream consumers. Each consumer may connect to one or more services. This has resulted in a complex architecture that is difficult to manage and does not scale well. The company needs a single interface to manage these services to consumers.
Which AWS service should be used to refactor this architecture?

a)

AWS Lambda

b)

AWS X-Ray

c)

Amazon SQS

d)

Amazon API Gateway

29.

When a Developer tries to run an AWS CodeBuild project, it raises an error because the length of all environment variables exceeds the limit for the combined maximum of characters.
What is the recommended solution?

a)

Add the export LC_ALL=ג€en_US.utf8ג€ command to the pre_build section to ensure POSIX localization.

b)

Use Amazon Cognito to store key-value pairs for large numbers of environment variables.

c)

Update the settings for the build project to use an Amazon S3 bucket for large numbers of environment variables.

d)

Use AWS Systems Manager Parameter Store to store large numbers of environment variables.

30.

A Development team decides to adopt a continuous integration/continuous delivery (CI/CD) process using AWS CodePipeline and AWS CodeCommit for a new application. However, management wants a person to review and approve the code before it is deployed to production.
How can the Development team add a manual approver to the CI/CD pipeline?

a)

Use AWS SES to send an email to approvers when their action is required. Develop a simple application that allows approvers to accept or reject a build. Invoke an AWS Lambda function to advance the pipeline when a build is accepted.

b)

If approved, add an approved tag when pushing changes to the CodeCommit repository. CodePipeline will proceed to build and deploy approved commits without interruption.

c)

Add an approval step to CodeCommit. Commits will not be saved until approved.

d)

Add an approval action to the pipeline. Configure the approval action to publish to an Amazon SNS topic when approval is required. The pipeline execution will stop and wait for an approval.

31.

A Developer is migrating an on-premises application to AWS. The application currently takes user uploads and saves them to a local directory on the server. All uploads must be saved and made immediately available to all instances in an Auto Scaling group.
Which approach will meet these requirements?

a)

Use Amazon EBS and configure the application AMI to use a snapshot of the same EBS instance on boot.

b)

Use Amazon S3 and rearchitect the application so all uploads are placed in S3.

c)

Use instance storage and share it between instances launched from the same Amazon Machine Image (AMI).

d)

Use Amazon EBS and file synchronization software to achieve eventual consistency among the Auto Scaling group.

32.

A developer is creating a script to automate the deployment process for a serverless application. The developer wants to use an existing AWS Serverless
Application Model (AWS SAM) template for the application.
What should the developer use for the project? (Choose two.)

a)

Call aws cloudformation package to create the deployment package. Call aws cloudformation deploy to deploy the package afterward.

b)

Call sam package to create the deployment package. Call sam deploy to deploy the package afterward.

c)

Call aws s3 cp to upload the AWS SAM template to Amazon S3. Call aws lambda update-function-code to create the application.

d)

Create a ZIP package locally and call aws serverlessrepo create-application to create the application.

e)

Create a ZIP package and upload it to Amazon S3. Call aws cloudformation create-stack to create the application.

33.

A developer has built a market application that stores pricing data in Amazon DynamoDB with Amazon ElastiCache in front. The prices of items in the market change frequently. Sellers have begun complaining that, after they update the price of an item, the price does not actually change in the product listing.
What could be causing this issue?

a)

The cache is not being invalidated when the price of the item is changed

b)

The price of the item is being retrieved using a write-through ElastiCache cluster

c)

The DynamoDB table was provisioned with insufficient read capacity

d)

The DynamoDB table was provisioned with insufficient write capacity

34.

The developer is creating a web application that collects highly regulated and confidential user data through a POST request. The web application is served through Amazon CloudFront. User names and phone numbers must be encrypted at the edge and must remain encrypted throughout the entire application stack.
What is the MOST secure way to meet these requirements?

a)

Enforce Match Viewer with HTTPS Only on CloudFront.

b)

Use only the newest TLS security policy on CloudFront.

c)

Enforce a signed URL on CloudFront on the front end.

d)

Use field-level encryption on CloudFront.

35.

A Developer has been asked to create an AWS Lambda function that is triggered any time updates are made to items in an Amazon DynamoDB table. The function has been created, and appropriate permissions have been added to the Lambda execution role. Amazon DynamoDB streams have been enabled for the table, but the function is still not being triggered.
Which option would enable DynamoDB table updates to trigger the Lambda function?

a)

Change the StreamViewType parameter value to NEW_AND_OLD_IMAGES for the DynamoDB table

b)

Configure event source mapping for the Lambda function

c)

Map an Amazon SNS topic to the DynamoDB streams

d)
  • Increase the maximum execution time (timeout) setting of the Lambda function

Reveal Solution   Discussion   30

36.

A company maintains a REST service using Amazon API Gateway and the API Gateway native API key validation. The company recently launched a new registration page, which allows users to sign up for the service. The registration page creates a new API key using CreateApiKey and sends the new key to the user. When the user attempts to call the API using this key, the user receives a 403 Forbidden error. Existing users are unaffected and can still call the API.
What code updates will grant these new users access to the API?

a)

The createDeployment method must be called so the API can be redeployed to include the newly created API key.

b)

The updateAuthorizer method must be called to update the API's authorizer to include the newly created API key.

c)

The importApiKeys method must be called to import all newly created API keys into the current stage of the API.

d)

The createUsagePlanKey method must be called to associate the newly created API key with the correct usage plan.

37.

An application uploads photos to an Amazon S3 bucket. Each photo that is uploaded to the S3 bucket must be resized to a thumbnail image by the application.
Each thumbnail image is uploaded with a new name in the same S3 bucket.
Which AWS service can a developer configure to directly process each single S3 event for each S3 object upload?

a)

Amazon EC2

b)

Amazon Elastic Container Service (Amazon ECS)

c)

AWS Elastic Beanstalk

d)

AWS Lambda

38.

A company is running a Docker application on Amazon ECS. The application must scale based on user load in the last 15 seconds.
How should a Developer instrument the code so that the requirement can be met?

a)

Create a high-resolution custom Amazon CloudWatch metric for user activity data, then publish data every 30 seconds

b)

Create a high-resolution custom Amazon CloudWatch metric for user activity data, then publish data every 5 seconds

c)

Create a standard-resolution custom Amazon CloudWatch metric for user activity data, then publish data every 30 seconds

d)

Create a standard-resolution custom Amazon CloudWatch metric for user activity data, then publish data every 5 seconds

39.

Where should the appspec.yml file be placed in order for AWS CodeDeploy to work?

a)

In the root of the application source code directory structure

b)

In the bin folder along with all the complied code

c)

In an S3 bucket

d)

In the same folder as the application configuration files

40.

A Developer is working on an application that handles 10MB documents that contain highly-sensitive data. The application will use AWS KMS to perform client- side encryption.
What steps must be followed?

a)

Invoke the Encrypt API passing the plaintext data that must be encrypted, then reference the customer managed key ARN in the KeyId parameter

b)

Invoke the GenerateRandom API to get a data encryption key, then use the data encryption key to encrypt the data

c)

Invoke the GenerateDataKey API to retrieve the encrypted version of the data encryption key to encrypt the data

d)

Invoke the GenerateDataKey API to retrieve the plaintext version of the data encryption key to encrypt the data

41.

An application uses Amazon Kinesis Data Streams to ingest and process large streams of data records in real time. Amazon EC2 instances consume and process the data from the shards of the Kinesis data stream by using Amazon Kinesis Client Library (KCL). The application handles the failure scenarios and does not require standby workers. The application reports that a specific shard is receiving more data than expected. To adapt to the changes in the rate of data flow, the
`hot` shard is resharded.
Assuming that the initial number of shards in the Kinesis data stream is 4, and after resharding the number of shards increased to 6, what is the maximum number of EC2 instances that can be deployed to process data from all the shards?

a)

12

b)

6

c)

4

d)

1

42.

A Company runs continuous integration/continuous delivery (CI/CD) pipelines for its application on AWS CodePipeline. A Developer must write unit tests and run them as part of the pipelines before staging the artifacts for testing.
How should the Developer incorporate unit tests as part of CI/CD pipelines?

a)

Create a separate CodePipeline pipeline to run unit tests

b)

Update the AWS CodeBuild specification to include a phase for running unit tests

c)

Install the AWS CodeDeploy agent on an Amazon EC2 instance to run unit tests

d)
  • Create a testing branch in AWS CodeCommit to run unit tests

Reveal Solution   Discussion   21

43.

A Developer has written an application that runs on Amazon EC2 instances and generates a value every minute. The Developer wants to monitor and graph the values generated over time without logging in to the instance each time.
Which approach should the Developer use to achieve this goal?

a)

Use the Amazon CloudWatch metrics reported by default for all EC2 instances. View each value from the CloudWatch console.

b)

Develop the application to store each value in a file on Amazon S3 every minute with the timestamp as the name.

c)

Publish each generated value as a custom metric to Amazon CloudWatch using available AWS SDKs.

d)

Store each value as a variable and add the variable to the list of EC2 metrics that should be reported to the Amazon CloudWatch console.

44.

A developer is trying to get data from an Amazon DynamoDB table called demoman-table. The developer configured the AWS CLI to use a specific IAM user's credentials and executed the following command:
AWS DYNAMODB GET-ITEM --TABLE-NAME --DEMOMAN-TABLE --KEY `{"ID":{"N":"1993"}}`
The command returned errors and no rows were returned.
What is the MOST likely cause of these issues?

a)

The command is incorrect; it should be rewritten to use put-item with a string argument.

b)

The developer needs to log a ticket with AWS Support to enable access to the demoman-table.

c)

Amazon DynamoDB cannot be accessed from the AWS CLI and needs to be called via the REST API.

d)

The IAM user needs an associated policy with read access to demoman-table.

45.

A Development team is working on a case management solution that allows medical claims to be processed and reviewed. Users log in to provide information related to their medical and financial situations.
As part of the application, sensitive documents such as medical records, medical imaging, bank statements, and receipts are uploaded to Amazon S3. All documents must be securely transmitted and stored. All access to the documents must be recorded for auditing.
What is the MOST secure approach?

a)

Use S3 default encryption using Advanced Encryption Standard-256 (AES-256) on the destination bucket.

b)

Use Amazon Cognito for authorization and authentication to ensure the security of the application and documents.

c)

Use AWS Lambda to encrypt and decrypt objects as they are placed into the S3 bucket.

d)

Use client-side encryption/decryption with Amazon S3 and AWS KMS.

46.

A developer is planning to use an Amazon API Gateway and AWS Lambda to provide a REST API. The developer will have three distinct environments to manage: development, test, and production.
How should the application be deployed while minimizing the number of resources to manage?

a)

Create a separate API Gateway and separate Lambda function for each environment in the same Region.

b)

Assign a Region for each environment and deploy API Gateway and Lambda to each Region.

c)

Create one API Gateway with multiple stages with one Lambda function with multiple aliases.

d)

Create one API Gateway and one Lambda function, and use a REST parameter to identify the environment.

47.

An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application
Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally.
Based on this scenario, what is the MOST cost-effective solution to this problem?

a)

Remove the application from the ALB. Delete the ALB and change Amazon Route 53 to direct traffic to the instance running the application.

b)

Remove the application from the ALB. Create a Classic Load Balancer in its place. Direct traffic to the application using the HTTP protocol.

c)

Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header.

d)

Alter the application code to inspect a custom header. Alter the client code to pass the IP address in the custom header.

48.

A developer tested an application locally and then deployed it to AWS Lambda. While testing the application remotely, the Lambda function fails with an access denied message.
How can this issue be addressed?

a)

Update the Lambda function's execution role to include the missing permissions.

b)

Update the Lambda function's resource policy to include the missing permissions.

c)

Include an IAM policy document at the root of the deployment package and redeploy the Lambda function.

d)

Redeploy the Lambda function using an account with access to the AdministratorAccess policy.

49.

A Developer must analyze performance issues with production-distributed applications written as AWS Lambda functions. These distributed Lambda applications invoke other components that make up the applications.
How should the Developer identify and troubleshoot the root cause of the performance issues in production?

a)

Add logging statements to the Lambda functions, then use Amazon CloudWatch to view the logs.

b)

Use AWS CloudTrail and then examine the logs.

c)

Use AWS X-Ray, then examine the segments and errors.

d)

Run Amazon Inspector agents and then analyze performance.

50.

A company is building a compute-intensive application that will run on a fleet of Amazon EC2 instances. The application uses attached Amazon EBS disks for storing data. The application will process sensitive information and all the data must be encrypted.
What should a Developer do to ensure the data is encrypted on disk without impacting performance?

a)

Configure the Amazon EC2 instance fleet to use encrypted EBS volumes for storing data.

b)

Add logic to write all data to an encrypted Amazon S3 bucket.

c)

Add a custom encryption algorithm to the application that will encrypt and decrypt all data.

d)

Create a new Amazon Machine Image (AMI) with an encrypted root volume and store the data to ephemeral disks.

51.

A Developer is working on a serverless project based in Java. Initial testing shows a cold start takes about 8 seconds on average for AWS Lambda functions.
What should the Developer do to reduce the cold start time? (Choose two.)

a)

Add the Spring Framework to the project and enable dependency injection.

b)

Reduce the deployment package by including only needed modules from the AWS SDK for Java.

c)

Increase the memory allocation setting for the Lambda function.

d)

Increase the timeout setting for the Lambda function.

e)

Change the Lambda invocation mode from synchronous to asynchronous.

52.

A company runs an e-commerce website that uses Amazon DynamoDB where pricing for items is dynamically updated in real time. At any given time, multiple updates may occur simultaneously for pricing information on a particular product. This is causing the original editor's changes to be overwritten without a proper review process.
Which DynamoDB write option should be selected to prevent this overwriting?

a)

Concurrent writes

b)

Conditional writes

c)

Atomic writes

d)

Batch writes

53.

A developer is storing JSON files in an Amazon S3 bucket. The developer wants to securely share an object with a specific group of people.
How can the developer securely provide temporary access to the objects that are stored in the S3 bucket?

a)

Set object retention on the files. Use the AWS software development kit (SDK) to restore the object before subsequent requests. Provide the bucket's S3 URL.

b)

Use the AWS software development kit (SDK) to generate a presigned URL. Provide the presigned URL.

c)

Set a bucket policy that restricts access after a period of time. Provide the bucket's S3 URL.

d)

Configure static web hosting on the S3 bucket. Provide the bucket's web URL.

54.

A front-end web application is using Amazon Cognito user pools to handle the user authentication flow. A developer is integrating Amazon DynamoDB into the application using the AWS SDK for JavaScript.
How would the developer securely call the API without exposing the access or secret keys?

a)

Configure Amazon Cognito identity pools and exchange the JSON Web Token (JWT) for temporary credentials.

b)

Run the web application in an Amazon EC2 instance with the instance profile configured.

c)

Hardcore the credentials, use Amazon S3 to host the web application, and enable server-side encryption.

d)

Use Amazon Cognito user pool JSON Web Tokens (JWITs) to access the DynamoDB APIs.

55.

A Developer must build an application that uses Amazon DynamoDB. The requirements state that the items being stored in the DynamoDB table will be 7KB in size and that reads must be strongly consistent. The maximum read rate is 3 items per second, and the maximum write rate is 10 items per second.
How should the Developer size the DynamoDB table to meet these requirements?

a)

Read: 3 read capacity units Write: 70 write capacity units

b)

Read: 6 read capacity units Write: 70 write capacity units

c)

Read: 6 read capacity units Write: 10 write capacity units

d)

Read: 3 read capacity units Write: 10 write capacity units

56.

A company needs to ingest terabytes of data each hour from thousands of sources that are delivered almost continually throughout the day. The volume of messages generated varies over the course of the day. Messages must be delivered in real time for fraud detection and live operational dashboards.
Which approach will meet these requirements?

a)

Send the messages to an Amazon SQS queue, then process the messages by using a fleet of Amazon EC2 instances

b)

Use the Amazon S3 API to write messages to an S3 bucket, then process the messages by using Amazon Redshift

c)

Use AWS Data Pipeline to automate the movement and transformation of data

d)

Use Amazon Kinesis Data Streams with Kinesis Client Library to ingest and deliver messages

57.

A developer is debugging an AWS Lambda function behind an Amazon API Gateway. Whenever the API Gateway endpoint is called, HTTP status code 200 is returned even though AWS Lambda is recording a 4xx error.
What change needs to be made to return a proper error code through the API Gateway?

a)

Enable CORS in the API Gateway method settings

b)

Use a Lambda proxy integration to return HTTP codes and headers

c)

Enable API Gateway error pass-through.

d)

Return the value in the header x-Amzn-ErrorType.

58.

For a deployment using AWS CodeDeploy, what is the run order of the hooks for in-place deployments?

a)

Before Install -> Application Stop -> Application Start -> After Install

b)

Application Stop -> Before Install -> After Install -> Application Start

c)

Before Install -> Application Stop -> Validate Service -> Application Start

d)
  • Application Stop -> Before Install -> Validate Service -> Application Start

Reveal Solution   Discussion   13

59.

A developer is using Amazon S3 as the event source that invokes a Lambda function when new objects are created in the bucket. The event source mapping information is stored in the bucket notification configuration. The developer is working with different versions of the Lambda function, and has a constant need to update notification configuration so that Amazon S3 invokes the correct version.
What is the MOST efficient and effective way to achieve mapping between the S3 event and Lambda?

a)

Use a different Lambda trigger.

b)

Use Lambda environment variables.

c)

Use a Lambda alias.

d)

Use Lambda tags.

60.

A company has a multi-tier application that uses Amazon API Gateway, AWS Lambda, and Amazon RDS. The company wants to investigate a slow response time to calls that come from the API Gateway API.
What is the MOST operationally efficient way for the company to determine which internal call is causing the slow response times?

a)

Use Amazon CloudWatch.

b)

Use AWS X-Ray.

c)

Use AWS CloudTrail.

d)

Use VPC Flow Logs.