Free DVA-C02 Practice Questions & Study Guide (2026)

Official Exam Details: (DVA-C02)

Exam Code:
DVA-C02
Passing Score:
70%
Total Question Bank:
658 Verified Questions
Exam Duration:
120 Minutes

Exam Format & Question Types

This certification exam features multiple-choice questions (single and multi-select), interactive Hotspots, Hot Areas, and Drag-and-Drop scenario configurations designed to test real-world technical competency.

AWS Certified Developer – Associate (DVA-C02) Study Guide & Architectural Blueprint

1. Exam Overview & Profile

The AWS Certified Developer – Associate (DVA-C02) certification validates an individual’s ability to effectively write, deploy, and debug cloud-based applications using AWS. This exam targets developers with at least one year of hands-on experience developing and maintaining an AWS-based application. Candidates should possess in-depth knowledge of core AWS services, understanding of the AWS shared responsibility model, and proficiency in deploying and debugging applications. The exam typically consists of approximately 65 multiple-choice, multiple-response questions to be completed within 130 minutes. A scaled score of 700 out of 1000 is required to pass, emphasizing a strong foundational understanding of AWS development practices.

2. Deep-Dive Domain Breakdown

Mastering DVA-C02 requires a deep dive into the following architectural concepts, service selections, and core technologies:

  • Deployment (24%)

    Focus on AWS CodeCommit (source control), CodeBuild (build and test), CodeDeploy (deployment to various compute services), and CodePipeline (orchestration). Understand deployment strategies like blue/green, canary, and rolling updates. Proficiency in Infrastructure as Code (IaC) with AWS CloudFormation and Serverless Application Model (SAM) templates is crucial for repeatable, consistent deployments of serverless and containerized applications.

  • Security (18%)

    Core knowledge of IAM (roles, policies, least privilege principle), data encryption (KMS, S3 encryption options like SSE-S3, SSE-KMS, SSE-C; EBS/RDS encryption). Understand AWS Secrets Manager and Systems Manager Parameter Store (Secure String) for sensitive data handling. Network security through VPC, Security Groups, NACLs, and endpoint services (VPC Endpoints, PrivateLink).

  • Development with AWS Services (30%)

    Serverless: Deep understanding of AWS Lambda (triggers, execution environment, layers, concurrency, cold starts, dead-letter queues) and Amazon API Gateway (integrations, caching, throttling, custom authorizers). Databases: Amazon DynamoDB (partition/sort keys, GSI/LSI, DAX), Amazon RDS (Multi-AZ, Read Replicas), Aurora Serverless. Messaging: Amazon SQS (Standard, FIFO, DLQs), Amazon SNS, Amazon EventBridge for event-driven architectures. Storage: Amazon S3 (lifecycle policies, versioning, various storage classes), Amazon EBS. Familiarity with AWS Step Functions for orchestrating distributed applications.

  • Refactoring (10%)

    Architectural patterns for breaking down monolithic applications into microservices. Decoupling application components using message queues (SQS), publish/subscribe (SNS), and event buses (EventBridge). Optimizing application components for cost, performance, and scalability, often involving serverless and containerization strategies.

  • Monitoring and Troubleshooting (18%)

    Utilize Amazon CloudWatch for collecting logs, metrics, and setting alarms. Implement distributed tracing with AWS X-Ray for performance analysis and debugging. Understand CloudTrail for auditing API calls. Proficiency in troubleshooting common issues with Lambda functions (timeouts, memory issues, permissions) and other integrated services.

3. High-Yield Exam Tips & Scenario Traps

  • Prioritize Security: Always default to the principle of least privilege for IAM roles. Encrypt data at rest and in transit using appropriate AWS services (KMS, S3 encryption). Never hardcode credentials.
  • Embrace Serverless: Understand the benefits and limitations of Lambda and API Gateway. Scenarios often test knowledge of Lambda concurrency, invocation types, and cost optimization.
  • Decoupling is Key: For scalable, fault-tolerant architectures, think SQS, SNS, and EventBridge. Differentiate between SQS Standard (high throughput, best effort ordering) and SQS FIFO (exactly-once processing, strict ordering).
  • Infrastructure as Code: Practice building and deploying resources using CloudFormation or SAM templates. This ensures repeatability and reduces manual errors.
  • Observability: CloudWatch is for basic metrics and logs. X-Ray is for distributed tracing across microservices. CloudTrail is for auditing API calls. Know when to use each.
  • Data Store Selection: Choose the right database for the job. DynamoDB for high-performance key-value workloads (understand partition/sort key design). RDS for relational data.
  • Scenario Traps: Watch for keywords like “least operational overhead,” “most cost-effective,” “highly available,” or “real-time.” These will guide you to the most appropriate AWS service and configuration. Be wary of solutions that introduce single points of failure or unnecessary complexity.

4. Frequently Asked Questions (FAQ)

Q1: What is the most effective way to prepare for the DVA-C02 exam?
A1: A balanced approach is best: start with official AWS documentation and whitepapers relevant to development, then engage in extensive hands-on labs. Build several serverless applications from scratch, implement CI/CD pipelines, and practice debugging. Supplement with high-quality practice exams to identify knowledge gaps and get comfortable with the exam format. Focus on understanding the “why” behind architectural choices.

Q2: How important are hands-on labs for this certification?
A2: Hands-on experience is absolutely critical. The DVA-C02 exam tests practical application and problem-solving skills, not just rote memorization. You’ll encounter scenario-based questions where understanding how services interact and behave in real-world situations is paramount. Without hands-on practice, it’s challenging to grasp the nuances of service configurations, common errors, and effective troubleshooting.

Q3: Should I focus on the newest AWS services and features?
A3: While staying current is good practice, for DVA-C02, prioritize a deep understanding of the established, core AWS services and features that are fundamental to application development. The exam predominantly tests knowledge of widely adopted services like Lambda, API Gateway, DynamoDB, SQS, SNS, and the Code* suite. Ensure you master the core capabilities and common use cases before delving into every new announcement.

Free DVA-C02 Sample Practice Questions

Test your knowledge with these sample scenario questions complete with verified explanations:

General Practice Questions

QUESTION 1

A company is offering APIs as a service over the internet to provide unauthenticated read access to statistical information that is updated daily. The company uses Amazon API Gateway and AWS Lambda to develop the APIs. The service has become popular, and the company wants to enhance the responsiveness of the APIs.

Which action can help the company achieve this goal?

  • A. Enable API caching in API Gateway.
  • B. Configure API Gateway to use an interface VPC endpoint.
  • C. Enable cross-origin resource sharing (CORS) for the APIs.
  • D. Configure usage plans and API keys in API Gateway.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 2

A developer is creating an application for a company. The application needs to read the file doc.txt that is placed in the folder of an Amazon S3 bucket that is named DOC-EXAMPLE-BUCKET. The company’s security team requires the principle of least privilege to be applied to the application’s IAM policy.

Which IAM policy statement will meet these security requirements?

  • A. options/DVAC02_1be0b2ac4f.webp
  • B. options/DVAC02_a5c92a9fd5.webp
  • C. options/DVAC02_4ca046fccb.webp
  • D. options/DVAC02_12bb700b15.webp
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 3

An ecommerce company is using an AWS Lambda function behind Amazon API Gateway as its application tier. To process orders during checkout, the calls a POST API from the frontend. The POST API invokes the Lambda function asynchronously. In rare situations. the application has not processed orders. The Lambda application show no errors or failures.

What should a developer do to solve this problem?

  • A. Inspect the frontend for API failures. Call the POST API manually by using the requests from the file.
  • B. Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events.
  • C. Inspect the Lambda logs in Amazon CloudWatch for possible errors. Fix the errors.
  • D. Make sure that caching is disabled for the POST API in API Gateway.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 4

A developer maintains an Amazon API Gateway REST API. Customers use the API through a frontend UI-and Amazon authentication.

The developer has a new version of the API that contains new endpoints and backward-incompatible interface The developer needs to provide access to other developers on the team without affecting customers.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Define a development stage on the API Gateway API. Instruct the other developers to point to the development stage.
  • B. Define a new API Gateway API that points to the new API application code. Instruct the other developers to point the endpoints to the new API.
  • C. Implement a query parameter in the API application code that determines which version to call.
  • D. Specify new API Gateway endpoints for the API endpoints that the developer wants to add.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 5

A developer is creating an application that Will store personal health information (PHI). The PHI needs to be encrypted at all times. An encrypted Amazon RDS MySQL DB instance is storing the data. The developer wants to increase the performance of the application by caching frequently accessed data while adding the ability to sort or rank the cached datasets.

Which solution will meet these requirements?

  • A. Create an Amazon ElastiCache for Redis instance. Enable encryption of data in transit and at rest. Store frequently accessed data the cache.
  • B. Create an Amazon ElastiCache Memcached instance. Enable encryption data in transit and at rest Store frequently accessed data in the cache.
  • C. Create an Ammon RDS for MySQL read replica. Connect to the read replica by using SSL. Configure the read replica to store frequently accessed data.
  • D. Create an DynamoDB table and a DynamoDB Accelerator (DAX) cluster for the table. Store frequently accessed data in the DynamoDB table.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 6

A company has an Amazon S3 bucket that contains sensitive data. The data must be encrypted in transit and at rest. The company encrypts the data in the S3 bucket by using an AWS Key Management Service (AWS KMS) key. A developer needs to grant several other AWS accounts the permission to use the S3 GetObject operation to retrieve the data from the S3 bucket.

How can the developer enforce that all requests to retrieve the data provide encryption in transit?

  • A. Define a resource-based policy on the S3 bucket to deny access when a request meets the condition “aws:SecureTransport”: “false”-.
  • B. Define a resource-based policy on the S3 bucket to allow when a request meets the condition “aws:SecureTransport”-: “false".
  • C. Define a role-based on the other accounts' roles to deny access when a request meets the condition of “aws:SecureTransort”: “false”.
  • D. Define a resource-based policy on the KMS key to deny access when a request meets the condition of “aws:SecureTransport”: “false".
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 7

A developer is using AWS Amplify Hosting to build and deploy an application. The developer is receiving an increased number of bug reports from users. The developer wants to add end-to-end testing to the application to eliminate as many bugs as possible the bugs reach production.

Which solution should the developer implement to meet these requirements?

  • A. Run the amplify add test command in the Amplify CLI.
  • B. Create unit tests in the application. Deploy the unit tests by using the amplify push command in the Amplify CLI.
  • C. Add a test phase to the amplify.yml build settings for the application.
  • D. Add a test phase to the aws-exports.js file for the application.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 8

A developer wants to expand an application to run in multiple AWS Regions. The developer wants to copy Amazon Machine Images (AMIs) with the latest changes and create a new application stack in the destination Region. According to company requirements, all AMIS must be encrypted in all Regions. However, not all the AMIS that the company uses are encrypted.

How can the developer expand the application to run in the destination Region while meeting the encryption requirement?

  • A. Create new AMIs, and specify encryption parameters. Copy the encrypted AMIS to the destination Region. Delete the unencrypted AMIs.
  • B. Use AWS Key Management Service (AWS KMS) to enable encryption on the unencrypted AMIS. Copy the encrypted AMIS to the destination Region.
  • C. Use AWS Certificate Manager (ACM) to enable encryption on the unencrypted AMIs. Copy the encrypted AMIS to the destination Region.
  • D. Copy the unencrypted AMIS to the destination Region. Enable encryption by default in the destination Region.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 9

A company is building a scalable data management solution by using AWS services to improve the speed and agility of development. The solution will ingest large volumes of data from various sources and will process this data through multiple business rules and transformations.

The solution requires business rules to run in and to handle reprocessing of data if errors occur when the business rules run. The company needs the solution to be scalable and to require the least possible maintenance.

Which AWS service should the company use to manage and automate the orchestration of the data flows to meet these requirements?

  • A. AWS Batch
  • B. AWS Step Functions
  • C. AWS Glue
  • D. AWS Lambda
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 10

An e-commerce web application that shares session state on-premises is being migrated to AWS. The application must be fault tolerant, natively highly scalable, and any service interruption should not affect the user experience.

What is the best option to store the session state?

  • A. Store the session state in Amazon ElastiCache.
  • B. Store the session state in Amazon CloudFront.
  • C. Store the session state in Amazon S3.
  • D. Enable session stickiness using elastic load balancers.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 11

A developer is creating an AWS Serverless Application Model (AWS SAM) template. The AWS SAM template contains the definition of multiple AWS Lambda functions. An Amazon S3 bucket. and an Amazon CloudFront One of the Lambda functions runs on Lambda@Edge in the CloudFront distribution. The S3 bucket is configured as an origin for the CloudFront distribution.

When the developer deploys the AWS SAM template in the eu-west-1 Region, the creation of the stack fails.

Which of the following could be the reason for this issue?

  • A. CloudFront distributions can be created only in the us-east-1 Region.
  • B. Lambda@Edge functions can be created only in the us-east-1 Region.
  • C. A single AWS SAM template cannot contain multiple Lambda functions.
  • D. The CloudFront distribution and the S3 bucket cannot be created in the same Region.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 12

A company is planning to use AWS CodeDeploy to deploy an application to Amazon Elastic Container Service (Amazon ECS). During the deployment of a new version of the application, the company initially must expose only 10% of live traffic to the new version of the deployed application. Then, after 15 minutes elapse, the company must route all the remaining live traffic to the new version of the deployed application.

Which CodeDeploy predefined configuration will meet these requirements?

  • A. CodeDeployDefault. ECSCanary10Percent 15Minutes
  • B. Code DeployDefault.LambdaCanary10Percent5Minutes
  • C. CodeDeployDefault.LambdaCanary10Percent15Minutes
  • D. CodeDeployDefault. ECSLinear10PercentEvery1 Minutes
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 13 (Multi-Select)

A real-time messaging application uses Amazon API Gateway APIs with backend HTTP service. A developer needs to build a feature in the application to identify a client that keeps connecting to and disconnecting from the WebSocket connection. The developer also needs the ability to remove the client.

Which combination of changes should the developer make to the application to meet these requirements? (Select TWO.)

  • A. Switch to HTTP APIs in the backend service.
  • B. Switch to REST APIs in the backend service.
  • C. Use the callback URL to disconnect the client from the backend service.
  • D. Add code to track the client status in Amazon ElastiCache in the backend service.
  • E. Implement $connect and $disconnect routes in the backend service.
Click to View Verified Solution & Explanation

Correct Option: D,E

QUESTION 14

A is leveraging a Border Gateway Protocol (BGP)-based AWS VPN connection to connect from on-premises to Amazon EC2 instances in the developer’s account. The developer is able to access an EC2 instance in subnet

  • A. VPN logs
  • B. BGP logs
  • C. VPC Flow Logs
  • D. AWS CloudTrail logs
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 15

A developer is implementing an AWS Cloud Development Kit (AWS CDK) serverless application. The developer will provision several AWS Lambda functions and Amazon API Gateway APIs during AWS CloudFormation stack creation. The developer’s workstation has the AWS Serverless Application (AWS SAM) and the AWS CDK installed locally.

How can the developer test a specific Lambda function locally?

  • A. Run the sam package and sam deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
  • B. Run the cdk synth and cdk deploy commands. Create a Lambda test event from the AWS Management Console. Test the Lambda function.
  • C. Run the cdk synth and sam local invoke commands with the function construct identifier and the path to the synthesized CloudFormation template.
  • D. Run the cdk synth and sam local start-lambda commands with the function construct identifier and the path to the synthesized CloudFormation template.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 16

A developer is creating a mobile app that calls a backend service by using an Amazon API Gateway REST API. For integration testing during the development phase, the developer wants to simulate different backend responses without invoking the backend service.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Create an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.
  • B. Create an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.
  • C. Customize the API Gateway stage to select a response type based on the request.
  • D. Use a request mapping template to select the mock integration response.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 17

A company is running a custom application on a set of on-premises Linux servers that are accessed using Amazon API Gateway. AWS X-Ray tracing has been enabled on the API test stage.

How can a developer enable X-Ray tracing on the on-premises servers with the LEAST amount of configuration?

  • A. Install and run the X-Ray SDK on the on-premises servers to capture and relay the data to the X-Ray service.
  • B. Install and run the X-Ray daemon on the on-premises servers to capture and relay the data to the X-Ray service.
  • C. Capture incoming requests on-premises and configure an AWS Lambda function to pull, process, and relay relevant data to X-Ray using the PutTraceSegments API call.
  • D. Capture incoming requests on-premises and configure an AWS Lambda function to pull, process, and relay relevant data to X-Ray using the PutTelemetryRecords API call.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 18

A developer has created an AWS Lambda function that is written in Python. The Lambda function reads data from objects in Amazon S3 and writes data to an Amazon DynamoDB table.

The function is successfully invoked from an S3 event notification when an object is created. However, the function fails when it attempts to write to the DynamoDB table.

What is the MOST likely cause of this issue?

  • A. The Lambda function's concurrency limit has been exceeded.
  • B. The DynamoDB table requires a global secondary index (GSI) to support writes.
  • C. The Lambda function does not have IAM permissions to write to DynamoDB.
  • D. The DynamoDB table is not running in the same Availability Zone as the Lambda function.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 19

A company has hundreds of AWS Lambda functions that the company’s QA team needs to test by using the Lambda function URLs. A developer needs to configure the authentication of the Lambda functions to allow access so that the QA IAM group can invoke the Lambda functions by using the public URLs.

Which solution will meet these requirements?

  • A. Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the AWS_IAM auth type. Run another script to create an IAM identity-based policy that allows the lambda:lnvokeFunctionUrl action to all the Lambda function Amazon Resource Names (ARNs). Attach the plicy to the QA IAM group.
  • B. Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the NONE auth type. Run another script to create an IAM resource- based policy that allows the lambda:lnvokeFunctionUrl action to all the Lambda function Amazon Resource Names (ARNs). Attach the policy to the QA IAM group.
  • C. Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the AWS_IAM auth type. Run another script to loop on the Lambda functions to create an IAM identity-based policy that allows the lambda:lnvokeFunctionUrl action from the QA IAM group's Amazon Resource Name (ANN).
  • D. Create a CLI script that loops on the Lambda functions to add a Lambda function URL with the NONE auth type. Run another script to loop on the Lambda functions to create an IAM resource-based policy that allows the lambda:lnvokeFunctionUrl action from the QA IAM group's Amazon Resource Name (ANN).
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 20

A developer is creating an application. New users of the application must be able to create an account and register by using their own social media accounts.

Which AWS service or resource should the developer use to meet these requirements?

  • A. IAM role
  • B. Amazon Cognito identity pools
  • C. Amazon Cognito user pools
  • D. AWS Directory Service
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 21

A developer is creating an AWS Lambda function in VPC mode. An Amazon S3 event will invoke the Lambda function when an object is uploaded into an S3 bucket. The Lambda function will process the object and produce some analytic results that will be recorded into a file. Each processed object will also generate a log entry that will be recorded into a file.

Other Lambda functions. AWS services. and on-premises resources must have access to the result files and log file. Each log entry must also be appended to the same shared log file. The developer needs a solution that can share files and append results into an existing file.

Which solution should the developer use to meet these requirements?

  • A. Create an Amazon Elastic File System (Amazon EFS) file system. Mount the EFS file system in Lambda. Store the result files and log file in the mount point. Append the log entries to the log file.
  • B. Create an Amazon Elastic Block Store (Amazon EBS) Multi-Attach enabled volume. Attach the EBS volume to all Lambda functions. Update the Lambda function to download the log file. append the log entries. and upload the modified log file to Amazon EBS.
  • C. Create a reference to the /tmp local directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
  • D. Create a reference to the /opt storage directory. Store the result files and log file by using the directory reference. Append the log entry to the log file.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 22

A company needs to develop a proof of concept for a web service application. The application will show the weather forecast for one of the company’s office locations. The application will provide a REST endpoint that clients can call. Where possible. The application should use caching features provided by AWS to limit the number of requests to the backend service. The application backend will receive a small amount of traffic only during testing.

Which approach should the developer take to provide the REST endpoint MOST cost-effectively?

  • A. Create a container image. Deploy the container image by using Amazon Elastic Kubernetes Service (Amazon EKS). Expose the functionality by using Amazon API Gateway.
  • B. Create an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM). Expose the Lambda functionality by using Amazon API Gateway.
  • C. Create a container image. Deploy the container image by using Amazon Elastic Container Service (Amazon ECS). Expose the functionality by using Amazon API Gateway.
  • D. Create a microservices application. Deploy the application to AWS Elastic Beanstalk. Expose the AWS Lambda functionality by using an Application Load Balancer.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 23

A developer needs to build an AWS CloudFormation template that self-populates the AWS Region variable that deploys the CloudFormation template.

What is the MOST operationally efficient way to determine the Region in which the template is being deployed?

  • A. Use the AWS::Region pseudo parameter.
  • B. Require the Region as a CloudFormation parameter.
  • C. Find the Region from the AWS::Stackld pseudo parameter by using the Fn::Split intrinsic function.
  • D. Dynamically import the Region by referencing the relevant parameter in AWS Systems Manager Parameter Store.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 24

A social media application uses the AWS SDK for JavaScript on the frontend to get user credentials from AWS Security Token Service (AWS STS). The application stores its assets in an Amazon S3 bucket. The application serves its content by using an Amazon CloudFront distribution with the origin set to the S3 bucket.

The credentials for the role that the application assumes to make the SDK calls are stored in plaintext in a JSON file within the application code. The developer needs to implement a solution that will allow the application to get user credentials without having any credentials hardcoded in the application code.

Which solution will meet these requirements?

  • A. Add a Lambda@Edge function to the distribution. Invoke the function on viewer request. Add permissions to the function's execution role to allow the function to access AWS STS. Move all SDK calls from the frontend into the function.
  • B. Add a CloudFront function to the distribution. Invoke the function on viewer request. Add permissions to the function's execution role to allow the function to access AWS STS. Move all SDK calls from the frontend into the function.
  • C. Add a Lambda@Edge function to the distribution. Invoke the function on viewer request. Move the credentials from the JSON file into the function. Move all SDK calls from the frontend into the function.
  • D. Add a CloudFront function to the distribution. Invoke the function on viewer request. Move the credentials from the JSON file into the function. Move all SDK calls from the frontend into the function.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 25

A developer is integrating Amazon ElastiCache in an application. The cache will store data from a database. The cached data must populate real-time dashboards.

Which caching strategy will meet these requirements?

  • A. A read-through cache
  • B. A write-behind cache
  • C. A lazy-loading cache
  • D. A write-through cache
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 26 (Multi-Select)

A company has a web application that is deployed on AWS. The application uses an Amazon API Gateway API and an AWS Lambda function as its backend.

The application recently demonstrated unexpected behavior. A developer examines the Lambda function code. finds an error. and modifies the code to resolve the problem. Before deploying the change to production, the developer needs to run tests to validate that the application operates properly.

The application has only a production environment available. The developer must create a new development environment to test the code changes. The developer must also prevent other developers from overwriting these changes during the test cycle.

Which combination of steps will meet these requirements with the LEAST development effort? (Select TWO.)

  • A. Create a new resource in the current stage. Create a new method with Lambda proxy integration. Select the Lambda function. Add the hotfix alias. Redeploy the current stage. Test the backend.
  • B. Update the Lambda function in the API Gateway API integration request to use the hotfix alias. Deploy the API Gateway API to a new stage named hotfix. Test the backend.
  • C. Modify the Lambda function by fixing the Test the Lambda function. Create the alias hotfix. Point the alias to the SLATEST version.
  • D. Modify the Lambda function by fixing the Test the Lambda function. When the Lambda function is working as publish the Lambda function as a new version. Create the alias hotfix. Point the alias to the new version.
  • E. Create a new API Gateway API for the development environment. Add a resource and method with integration. Choose the Lambda function and the hotfix alias. Deploy to a new stage. Test the backend.
Click to View Verified Solution & Explanation

Correct Option: B,D

QUESTION 27

A developer is creating an application that will give users the ability to store photos from their cellphones in the cloud. The application needs to support tens of thousands of users. The application uses an Amazon API Gateway REST API that is integrated with AWS Lambda functions to process the photos. The application stores details about the photos in Amazon DynamoDB.

Users need to create an account to access the application. In the application, users must be able to upload photos and retrieve previously uploaded photos. The photos will range in size from 300 KB to 5 MB.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos and details in the DynamoDB table. Retrieve previously uploaded photos directly from the DynamoDB table.
  • B. Use Amazon Cognito user pools to manage user accounts. Create an Amazon Cognito user pool authorizer in API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • C. Create an IAM user for each user of the application during the sign-up process. Use IAM authentication to access the API Gateway API. Use the Lambda function to store the photos in Amazon S3. Store the object's S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photosby querying DynamoDB for the S3 key.
  • D. Create a user’s table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the user’s table. Integrate the Lambda authorizer with API Gateway to control access to the API. Use the Lambda function to store the photos in Amazon S3. Store the object’s S3 key as part of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 28

A developer is designing a serverless application with two AWS Lambda functions to process photos. One Lambda function stores objects in an Amazon S3 bucket and stores the associated metadata in an Amazon DynamoDB table. The other Lambda function fetches the objects from the S3 bucket by using the metadata from the DynamoDB table. Both Lambda functions use the same Python library to perform complex computations and are approaching the quota for the maximum size of zipped deployment packages.

What should the developer do to reduce the size of the Lambda deployment packages with the LEAST operational overhead?

  • A. Package each Python library in its own .zip file archive. Deploy each Lambda function with its own copy of the library.
  • B. Create a Lambda layer with the required Python library. Use the Lambda layer in both Lambda functions.
  • C. Combine the two Lambda functions into one Lambda function. Deploy the Lambda function as a single .zip file archive.
  • D. Download the Python library to an S3 bucket. Program the Lambda functions to reference the object URLs.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 29

A developer is working on a serverless application that needs to process any changes to an Amazon DynamoDB table with an AWS Lambda function.

How should the developer configure the Lambda function to detect changes to the DynamoDB table?

  • A. Create an Amazon Kinesis data stream, and attach it to the DynamoDB table. Create a trigger to connect the data stream to the Lambda function.
  • B. Create an Amazon EventBridge rule to invoke the Lambda function on a regular schedule. Connect to the DynamoDB table from the Lambda function to detect changes.
  • C. Enable DynamoDB Streams on the table. Create a trigger to connect the DynamoDB stream to the Lambda function.
  • D. Create an Amazon Kinesis Data Firehose delivery stream, and attach it to the DynamoDB table. Configure the delivery stream destination as the Lambda function.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 30

A developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning. In case of any application errors, the developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place.

How can the developer accomplish this?

  • A. Install an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
  • B. Download the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
  • C. Upload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
  • D. Upload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 31

A company wants to deploy and maintain static websites on AWS. Each website’s source code is hosted in one of several version control systems, including AWS CodeCommit, Bitbucket, and GitHub.

The company wants to implement phased releases by using development, staging, user acceptance testing, and production environments in the AWS Cloud. Deployments to each environment must be started by code merges on the relevant Git branch. The company wants to use HTTPS for all data exchange. The company needs a solution that does not require servers to run continuously.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Host each website by using AWS Amplify with a serverless backend. Connect the repository branches that correspond to each of the desired environments. Start deployments by merging code changes to a desired branch.
  • B. Host each website in AWS Elastic Beanstalk with multiple environments. Use the EB CLI to link each repository branch. Integrate AWS CodePipeIine to automate deployments from version control code merges.
  • C. Host each website in different Amazon S3 buckets for each environment. Configure AWS CodePipeline to pull source code from version control. Add an AWS CodeBuild stage to copy source code to Amazon S3.
  • D. Host each website on its own Amazon EC2 instance. Write a custom deployment script to bundle each website's static assets. Copy the assets to Amazon EC2. Set up a workflow to run the script when code is merged.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 32 (Multi-Select)

An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2 instances are taking a long time to become available during scale-out events. The UserData script is taking a long time to run.

The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.

Which combination of steps should the developer take to meet these requirements? (Select TWO.)

  • A. Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.
  • B. Use EC2 Image Builder to create an Amazon Machine Image (AMI). Install the latest version of the application and all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.
  • C. Set up AWS CodeDeploy to deploy the most recent version of the application at runtime.
  • D. Set up AWS CodePipeline to deploy the most recent version of the application at runtime.
  • E. Remove any commands that perform operating system patching from the UserData script.
Click to View Verified Solution & Explanation

Correct Option: A,E

QUESTION 33

A developer has written an AWS Lambda function. The function is CPU-bound. The developer wants to ensure that the function returns responses quickly.

How can the developer improve the function’s performance?

  • A. Increase the function's CPU core count.
  • B. Increase the function's memory.
  • C. Increase the function's reserved concurrency.
  • D. Increase the function's timeout.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 34

A company writes customer orders to an Amazon DynamoDB table. For each order, the table stores the order ID, the order date, the total cost, and the customer’s name.

A developer uses the order date for the partition key in the table. Write activity on the tables has steadily increased recently. The company has noticed some throttling issues during write activity on the tables. The company expects that the write activity will continue to increase. Upon investigation, the developer discovered that the throttling is a result of a hot partition. The developer must improve the write performance of the table.

Which solution will meet this requirement MOST cost-effectively?

  • A. Increase the number of write capacity units (WCUs) for the table.
  • B. Append a hash suffix to the partition key value that is based on the order ID.
  • C. Add a global secondary index (GSI) that has its own write capacity units (WCUs).
  • D. Use DynamoDB Accelerator (DAX).
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 35

A developer is deploying an AWS Lambda function. The developer wants the ability to return to older versions of the function quickly and seamlessly.

How can the developer achieve this goal with the LEAST operational overhead?

  • A. Use AWS OpsWorks to perform blue/green deployments.
  • B. Use a function alias with different versions.
  • C. Maintain deployment packages for older versions in Amazon S3.
  • D. Use AWS CodePipeline for deployments and rollbacks.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 36 (Multi-Select)

A developer has an application that makes batch requests directly to Amazon DynamoDB by using the BatchGetItem low-level API operation. The responses frequently return values in the UnprocessedKeys element.

Which actions should the developer take to increase the resiliency of the application when the batch response includes values in UnprocessedKeys? (Select TWO.)

  • A. Retry the batch operation immediately.
  • B. Retry the batch operation with exponential backoff and randomized delay.
  • C. Update the application to use an AWS software development kit (AWS SDK) to make the requests.
  • D. Increase the provisioned read capacity of the DynamoDB tables that the operation accesses.
  • E. Increase the provisioned write capacity of the DynamoDB tables that the operation accesses.
Click to View Verified Solution & Explanation

Correct Option: B,C

QUESTION 37

A financial company must store original customer records for 10 years for legal reasons. A complete record contains personally identifiable information (PII). According to local regulations, PII is available to only certain people in the company and must not be shared with third parties. The company needs to make the records available to third- party organizations for statistical analysis without sharing the PII.

A developer wants to store the original immutable record in Amazon S3. Depending on who accesses the S3 document, the document should be returned as is or with all the PII removed. The developer has written an AWS Lambda function to remove the PII from the document. The function is named removePii.

What should the developer do so that the company can meet the PII requirements while maintaining only one copy of the document?

  • A. Set up an S3 event notification that invokes the removePii function when an S3 GET request is made. Call Amazon S3 by using a GET request to access the object without PII.
  • B. Set up an S3 event notification that invokes the removePii function when an S3 PUT request is made. Call Amazon S3 by using a PUT request to access the object without PII.
  • C. Create an S3 Object Lambda access point from the S3 console. Select the removePii function. Use S3 Access Points to access the object without PII.
  • D. Create an S3 access point from the S3 console. Use the access point name to call the GetObjectLegalHold S3 API function. Pass in the removePii function name to access the object without PII.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 38 (Multi-Select)

A developer is building a web application that uses Amazon API Gateway to expose an AWS Lambda function to process requests from clients. During testing, the developer notices that the API Gateway times out even though the Lambda function finishes under the set time limit.

Which of the following API Gateway metrics in Amazon CloudWatch can help the developer troubleshoot the issue? (Select TWO.)

  • A. CacheHitCount
  • B. IntegrationLatency
  • C. CacheMissCount
  • D. Latency
  • E. Count
Click to View Verified Solution & Explanation

Correct Option: B,D

QUESTION 39

A developer is creating an AWS CloudFormation template to deploy Amazon EC2 instances across multiple AWS accounts. The developer must choose the EC2 instances from a list of approved instance types.

How can the developer incorporate the list of approved instance types in the CloudFormation template?

  • A. Create a separate CloudFormation template for each EC2 instance type in the list.
  • B. In the Resources section of the CloudFormation template, create resources for each EC2 instance type in the list.
  • C. In the CloudFormation template, create a separate parameter for each EC2 instance type in the list.
  • D. In the CloudFormation template, create a parameter with the list of EC2 instance types as AllowedValues.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 40

An ecommerce company is using an AWS Lambda function behind Amazon API Gateway as its application tier. To process orders during checkout, the application calls a POST API from the frontend. The POST API invokes the Lambda function asynchronously. In rare situations, the application has not processed orders. The Lambda application logs show no errors or failures.

What should a developer do to solve this problem?

  • A. Inspect the frontend logs for API failures. Call the POST API manually by using the requests from the log file.
  • B. Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events.
  • C. Inspect the Lambda logs in Amazon CloudWatch for possible errors. Fix the errors.
  • D. Make sure that caching is disabled for the POST API in API Gateway.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 41

A developer is creating a template that uses AWS CloudFormation to deploy an application. The application is serverless and uses Amazon API Gateway, Amazon DynamoDB, and AWS Lambda.

Which AWS service or tool should the developer use to define serverless resources in YAML?

  • A. CloudFormation serverless intrinsic functions
  • B. AWS Elastic Beanstalk
  • C. AWS Serverless Application Model (AWS SAM)
  • D. AWS Cloud Development Kit (AWS CDK)
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 42

A developer is creating an AWS Lambda function. The Lambda function will consume messages from an Amazon Simple Queue Service (Amazon SQS) queue. The developer wants to integrate unit testing as part of the function’s continuous integration and continuous delivery (CI/CD) process.

How can the developer unit test the function?

  • A. Create an AWS CloudFormation template that creates an SQS queue and deploys the Lambda function. Create a stack from the template during the CI/CD process. Invoke the deployed function. Verify the output.
  • B. Create an SQS event for tests. Use a test that consumes messages from the SQS queue during the function's CI/CD process.
  • C. Create an SQS queue for tests. Use this SQS queue in the application's unit test. Run the unit tests during the CI/CD process.
  • D. Use the aws lambda invoke command with a test event during the CI/CD process.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 43

An application that is hosted on an Amazon EC2 instance needs access to files that are stored in an Amazon S3 bucket. The application lists the objects that are stored in the S3 bucket and displays a table to the user. During testing, a developer discovers that the application does not show any objects in the list.

What is the MOST secure way to resolve this issue?

  • A. Update the IAM instance profile that is attached to the EC2 instance to include the permission for the S3 bucket.
  • B. Update the IAM instance profile that is attached to the EC2 instance to include the S3:ListBucket permission for the S3 bucket.
  • C. Update the developer's user permissions to include the S3:ListBucket permission for the S3 bucket.
  • D. Update the S3 bucket policy by including the S3:ListBucket permission and by setting the Principal element to specify the account number of the EC2 instance.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 44

A company has a critical application on AWS. The application exposes an HTTP API by using Amazon API Gateway. The API is integrated with an AWS Lambda function. The application stores data in an Amazon RDS for MySQL DB instance with 2 virtual CPUs (vCPUs) and 64 GB of RAM.

Customers have reported that some of the API calls return HTTP 500 Internal Server Error responses. Amazon CloudWatch Logs shows errors for "too many connections."

The errors occur during peak usage times that are unpredictable.

The company needs to make the application resilient. The database cannot be down outside of scheduled maintenance hours.

Which solution will meet these requirements?

  • A. Decrease the number of vCPUs for the DB instance. Increase the max_connections setting.
  • B. Use Amazon RDS Proxy to create a proxy that connects to the DB instance. Update the Lambda function to connect to the proxy.
  • C. Add a CloudWatch alarm that changes the DB instance class when the number of connections increases to more than 1,000.
  • D. Add an Amazon EventBridge rule that increases the max_connections setting of the DB instance when CPU utilization is above 75%.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 45

A company hosts a client-side web application for one of its subsidiaries on Amazon S3. The web application can be accessed through Amazon CloudFront from https://www.example.com. After a successful rollout, the company wants to host three more client-side web applications for its remaining subsidiaries on three separate S3 buckets.

To achieve this goal, a developer moves all the common JavaScript files and web fonts to a central S3 bucket that serves the web applications. However, during testing, the developer notices that the browser blocks the JavaScript files and web fonts.

What should the developer do to prevent the browser from blocking the JavaScript files and web fonts?

  • A. Create four access points that allow access to the central S3 bucket. Assign an access point to each web application bucket.
  • B. Create a bucket policy that allows access to the central S3 bucket. Attach the bucket policy to the central S3 bucket.
  • C. Create a cross-origin resource sharing (CORS) configuration that allows access to the central S3 bucket. Add the CORS configuration to the central S3 bucket.
  • D. Create a Content-MD5 header that provides a message integrity check for the central S3 bucket. Insert the Content-MD5 header for each web application request.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 46

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.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 47

A company has installed smart meters in all its customer locations. The smart meters measure power usage at 1-minute intervals and send the usage readings to a remote endpoint for collection. The company needs to create an endpoint that will receive the smart meter readings and store the readings in a database. The company wants to store the location ID and timestamp information.

The company wants to give its customers low-latency access to their current usage and historical usage on demand. The company expects demand to increase significantly. The solution must not impact performance or include downtime while scaling.

Which solution will meet these requirements MOST cost-effectively?

  • A. Store the smart meter readings in an Amazon RDS database. Create an index on the location ID and timestamp columns. Use the columns to filter on the customers' data.
  • B. Store the smart meter readings in an Amazon DynamoDB table. Create a composite key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.
  • C. Store the smart meter readings in Amazon ElastiCache for Redis. Create a SortedSet key by using the location ID and timestamp columns. Use the columns to filter on the customers' data.
  • D. Store the smart meter readings in Amazon S3. Partition the data by using the location ID and timestamp columns. Use Amazon Athena to filter on the customers' data.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 48

A developer is testing a new file storage application that uses an Amazon CloudFront distribution to serve content from an Amazon S3 bucket. The distribution accesses the S3 bucket by using an origin access identity (OAI). The S3 bucket’s permissions explicitly deny access to all other users.

The application prompts users to authenticate on a login page and then uses signed cookies to allow users to access their personal storage directories. The developer has configured the distribution to use its default cache behavior with restricted viewer access and has set the origin to point to the S3 bucket. However, when the developer tries to navigate to the login page, the developer receives a 403 Forbidden error.

The developer needs to implement a solution to allow unauthenticated access to the login page. The solution also must keep all private content secure.

Which solution will meet these requirements?

  • A. Add a second cache behavior to the distribution with the same origin as the default cache behavior. Set the path pattern for the second cache behavior to the path of the login page, and make viewer access unrestricted. Keep the default cache behavior's settings unchanged.
  • B. Add a second cache behavior to the distribution with the same origin as the default cache behavior. Set the path pattern for the second cache behavior to * and make viewer access restricted. Change the default cache behavior's path pattern to the path of the login page, and make viewer access unrestricted.
  • C. Add a second origin as a failover origin to the default cache behavior. Point the failover origin to the S3 bucket. Set the path pattern for the primary origin to * and make viewer access restricted. Set the path pattern for the failover origin to the path of the login page, and make viewer access unrestricted.
  • D. Add a bucket policy to the S3 bucket to allow read access. Set the resource on the policy to the Amazon Resource Name (ARN) of the login page object in the S3 bucket. Add a CloudFront function to the default cache behavior to redirect unauthorized requests to the login page's S3 URI.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 49

An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the developer wants to examine the logs of the Lambda function code for errors.

Based on this system configuration, where would the developer find the logs?

  • A. Amazon S3
  • B. AWS CloudTrail
  • C. Amazon CloudWatch
  • D. Amazon DynamoDB
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 50 (Multi-Select)

A company is using an AWS Lambda function to process records from an Amazon Kinesis data stream. The company recently observed slow processing of the records. A developer notices that the iterator age metric for the function is increasing and that the Lambda run duration is constantly above normal.

Which actions should the developer take to increase the processing speed? (Select TWO.)

  • A. Increase the number of shards of the Kinesis data stream.
  • B. Decrease the timeout of the Lambda function.
  • C. Increase the memory that is allocated to the Lambda function.
  • D. Decrease the number of shards of the Kinesis data stream.
  • E. Increase the timeout of the Lambda function.
Click to View Verified Solution & Explanation

Correct Option: A,C

QUESTION 51

A developer is designing an AWS Lambda function that creates temporary files that are less than 10 MB during invocation. The temporary files will be accessed and modified multiple times during invocation. The developer has no need to save or retrieve these files in the future.

Where should the temporary files be stored?

  • A. the /tmp directory
  • B. Amazon Elastic File System (Amazon EFS)
  • C. Amazon Elastic Block Store (Amazon EBS)
  • D. Amazon S3
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 52 (Multi-Select)

An application is processing clickstream data using Amazon Kinesis. The clickstream data feed into Kinesis experiences periodic spikes. The PutRecords API call occasionally fails and the logs show that the failed call returns the response shown below:

Which techniques will help mitigate this exception? (Choose two.)

  • A. Implement retries with exponential backoff.
  • B. Use a PutRecord API instead of PutRecords.
  • C. Reduce the frequency and/or size of the requests.
  • D. Use Amazon SNS instead of Kinesis.
  • E. Reduce the number of KCL consumers.
Click to View Verified Solution & Explanation

Correct Option: A,C

QUESTION 53

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

  • A. Beforelnstall -> ApplicationStop -> ApplicationStart -> Afterlnstall
  • B. ApplicationStop -> Beforelnstall -> Afterlnstall -> ApplicationStart
  • C. Beforelnstall -> ApplicationStop -> ValidateService -> ApplicationStart
  • D. ApplicationStop -> Beforelnstall -> ValidateService -> ApplicationStart
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 54

A developer is configuring the primary key of an Amazon DynamoDB table for an application. The application tracks a company’s sales to frequent customers. The application uses the data in the table to calculate the total amount a customer has spent. Each time a sale occurs, an item that has the following attributes is added to the table:

• customerld: a number that identifies each unique customer

• date: the date and time of the sale expressed as the number of milliseconds since midnight on January 1, 1970

• product: a label that indicates one of the company’s 25 available products

• unitPrice: the price of the product a customer purchased

Which configuration will represent a valid primary key?

  • A. A simple primary key that has the partition key set to customerld
  • B. A composite primary key that has the partition key set to customerld and the sort key set to date
  • C. A composite primary key that has the partition key set to customerld and the sort key set to product
  • D. A composite primary key that has the partition key set to customerld and the sort key set to unitPrice.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 55

A company is migrating legacy internal applications to AWS. Leadership wants to rewrite the internal employee directory to use native AWS services. A developer needs to create a solution for storing employee contact details and high-resolution photos for use with the new application.

Which solution will enable the search and retrieval of each employee’s individual details and high-resolution photos using AWS APIs?

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

Correct Option: B

QUESTION 56

A company has deployed an application on AWS Elastic Beanstalk. The company has configured the Auto Scaling group that is associated with the Elastic Beanstalk environment to have five Amazon EC2 instances. If the capacity is fewer than four EC2 instances during the deployment, application performance degrades. The company is using the all-at-once deployment policy.

What is the MOST cost-effective way to solve the deployment issue?

  • A. Change the Auto Scaling group to six desired instances.
  • B. Change the deployment policy to traffic splitting. Specify an evaluation time of I hour.
  • C. Change the deployment policy to rolling with additional batch. Specify a batch size of 1.
  • D. Change the deployment policy to rolling. Specify a batch size of 2.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 57

A development team wants to build a continuous integration/continuous delivery (CI/CD) pipeline. The team is using AWS CodePipeline to automate the code build and deployment. The team wants to store the program code to prepare for the CI/CD pipeline.

Which AWS service should the team use to store the program code?

  • A. AWS CodeDeploy
  • B. AWS CodeArtifact
  • C. AWS CodeCommit
  • D. Amazon CodeGuru
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 58

A developer has written the following IAM policy to provide access to an Amazon S3 bucket:

Which access does the policy allow regarding the s3:GetObject and s3:PutObject actions?

  • A. Access on all buckets except the "DOC-EXAMPLE-BUCKET" bucket
  • B. Access on all buckets that start with "DOC-EXAMPLE-BUCKET" except the "DOC-EXAMPLE-BUCKET/secrets" bucket.
  • C. Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket along with access to all S3 actions for objects in the "DOC-EXAMPLE-BUCKET" bucket that start with "secrets"
  • D. Access on all objects in the "DOC-EXAMPLE-BUCKET" bucket except on objects that start with "secrets"
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 59

A developer created an AWS Lambda function that accesses resources in a VPC. The Lambda function polls an Amazon Simple Queue Service (Amazon SQS) queue for new messages through a VPC endpoint. Then the function calculates a rolling average of the numeric values that are contained in the messages. After initial tests of the Lambda function, the developer found that the value of the rolling average that the function returned was not accurate.

How can the developer ensure that the function calculates an accurate rolling average?

  • A. Set the function's reserved concurrency to 1. Calculate the rolling average in the function. Store the calculated rolling average in Amazon ElastiCache.
  • B. Modify the function to store the values in Amazon ElastiCache. When the function initializes. use the previous values from the cache to calculate the rolling average.
  • C. Set the function's provisioned concurrency to 1. Calculate the rolling average in the function. Store the calculated rolling average in Amazon ElastiCache.
  • D. Modify the function to store the values in the function's layers. When the function initializes. use the previously stored values to calculate the rolling average.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 60

A developer is incorporating AWS X-Ray into an application that handles personal identifiable information (PII). The application is hosted on Amazon EC2 instances. The application trace messages include encrypted PII and go to Amazon CloudWatch. The developer needs to ensure that no PII goes outside of the EC2 instances.

Which solution will meet these requirements?

  • A. Manually instrument the X-Ray SDK in the application code.
  • B. Use the X-Ray auto-instrumentation agent.
  • C. Use Amazon Macie to detect and hide PII. Call the X-Ray API from AWS Lambda.
  • D. Use AWS Distro for OpenTelemetry.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 61

A developer creates a VPC named VPC-A that has public and private subnets. The developer also creates an Amazon RDS database inside the private subnet of VPC-

  • A. Modify the RDS security group. Add a rule to allow traffic from all the ports from the VPC CIDR block.
  • B. Redeploy the Lambda function in the same subnet as the RDS instance. Ensure that the RDS security group allows traffic from the Lambda function.
  • C. Create a security group for the Lambda function. Add a new rule in the RDS security group to allow traffic from the new Lambda security group.
  • D. Create an IAM role. Attach a policy that allows access to the RDS database. Attach the role to the Lambda function.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 62

A company has an application that uses AWS CodePipeline to automate its continuous integration and continuous delivery (CI/CD) workflow. The application uses AWS CodeCommit for version control. A developer who was working on one of the tasks did not pull the most recent changes from the main branch. A week later. the developer noticed merge conflicts.

How can the developer resolve the merge conflicts in the developer’s branch with the LEAST development effort?

  • A. Clone the repository. Create a new branch. Update the branch with the changes.
  • B. Create a new branch. Apply the changes from the previous branch.
  • C. Use the Commit Visualizer view to compare the commits when a feature was added. Fix the merge conflicts.
  • D. Stop the pull from the main branch to the feature branch. Rebase the feature branch from the main branch.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 63

An Amazon Kinesis Data Firehose delivery stream is receiving customer data that contains personally identifiable information. A developer needs to remove pattern- based customer identifiers from the data and store the modified data in an Amazon S3 bucket.

What should the developer do to meet these requirements?

  • A. Implement Kinesis Data Firehose data transformation as an AWS Lambda function. Configure the function to remove the customer identifiers. Set an Amazon S3 bucket as the destination of the delivery stream.
  • B. Launch an Amazon EC2 instance. Set the EC2 instance as the destination of the delivery stream. Run an application on the EC2 instance to remove the customer identifiers. Store the transformed data in an Amazon S3 bucket.
  • C. Create an Amazon OpenSearch Service instance. Set the OpenSearch Service instance as the destination of the delivery stream. Use search and replace to remove the customer identifiers. Export the data to an Amazon S3 bucket.
  • D. Create an AWS Step Functions workflow to remove the customer identifiers. As the last step in the workflow, store the transformed data in an Amazon S3 bucket. Set the workflow as the destination of the delivery stream.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 64

A company needs to harden its container images before the images are in a running state. The company’s application uses Amazon Elastic Container Registry (Amazon ECR) as an image registry, Amazon Elastic Kubernetes Service (Amazon EKS) for compute, and an AWS CodePipeline pipeline that orchestrates a continuous integration and continuous delivery (CI/CD) workflow.

Dynamic application security testing occurs in the final stage of the pipeline after a new image is deployed to a development namespace in the EKS cluster. A developer needs to place an analysis stage before this deployment to analyze the container image earlier in the CI/CD pipeline.

Which solution will meet these requirements with the MOST operational efficiency?

  • A. Build the container image and run the docker scan command locally. Mitigate any findings before pushing changes to the source code repository. Write a pre-commit hook that enforces the use of this workflow before commit.
  • B. Create a new CodePipeline stage that occurs after the container image is built. Configure ECR basic image scanning to scan on image push. Use an AWS Lambda function as the action provider. Configure the Lambda function to check the scan results and to fail the pipeline if there are findings.
  • C. Create a new CodePipeline stage that occurs after source code has been retrieved from its repository. Run a security scanner on the latest revision of the source code. Fail the pipeline if there are findings.
  • D. Add an action to the deployment stage of the pipeline so that the action occurs before the deployment to the EKS cluster. Configure ECR basic image scanning to scan on image push. Use an AWS Lambda function as the action provider. Configure the Lambda function to check the scan results and to fail the pipeline if there are findings.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 65

A developer is migrating some features from a legacy monolithic application to use AWS Lambda functions instead. The application currently stores data in an Amazon Aurora DB s private subnets in a VPC. The AWS account has one VPC deployed. The Lambda functions and the DB cluster are deployed in the same AWS Region in the same AWS account.

The developer needs to ensure that the Lambda functions can securely access the DB cluster without crossing the public internet.

Which solution will meet these requirements?

  • A. Configure the DB cluster's public access setting to Yes.
  • B. Configure an Amazon RDS database proxy for the Lambda functions.
  • C. Configure a NAT gateway and a security group for the Lambda functions.
  • D. Configure the VPC, subnets, and a security group for the Lambda functions.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 66

A developer wants to insert a record into an Amazon DynamoDB table as soon as a new file is added to an Amazon S3 bucket.

Which set of steps would be necessary to achieve this?

  • A. Create an event with Amazon EventBridge that will monitor the S3 bucket and then insert the records into DynamoDB.
  • B. Configure an S3 event to invoke an AWS Lambda function that inserts records into DynamoDB.
  • C. Create an AWS Lambda function that will poll the S3 bucket and then insert the records into DynamoDB.
  • D. Create a cron job that will run at a scheduled time and insert the records into DynamoDB.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 67

A developer wants to store information about movies. Each movie has a title, release year, and genre. The movie information also can include additional properties about the cast and production crew. This additional information is inconsistent across movies. For example, one movie might have an assistant director, and another movie might have an animal trainer.

The developer needs to implement a solution to support the following use cases:

• For a given title and release year, get all details about the movie that has that title and release year.

• For a given title, get all details about all movies that have that title.

• For a given genre, get all details about all movies in that genre.

Which data store configuration will meet these requirements?

  • A. Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the title as the partition key and the release year as the sort key. Create a global secondary index that uses the genre as the partition key and the title as the sort key.
  • B. Create an Amazon DynamoDB table. Configure the table with a primary key that consists of the genre as the partition key and the release year as the sort key. Create a global secondary index that uses the title as the partition key.
  • C. On an Amazon RDS DB instance, create a table that contains columns for title, release year, and genre. Configure the title as the primary key.
  • D. On an Amazon RDS DB instance, create a table where the primary key is the title and all other data is encoded into JSON format as one additional column.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 68

A developer is creating an application that will be deployed on IoT devices. The application will send data to a RESTful API that is deployed as an AWS Lambda function. The application will assign each API request a unique identifier. The volume of API requests from the application can randomly increase at any given time of day.

During periods of request throttling, the application might need to retry requests. The API must be able to handle duplicate requests without inconsistencies or data loss.

Which solution will meet these requirements?

  • A. Create an Amazon RDS for MySQL DB instance. Store the unique identifier for each request in a database table. Modify the function to check the table for the identifier before processing the request.
  • B. Create an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to check the table for the identifier before processing the request.
  • C. Create an Amazon DynamoDB table. Store the unique identifier for each request in the table. Modify the Lambda function to return a client error response when the function receives a duplicate request.
  • D. Create an Amazon ElastiCache for Memcached instance. Store the unique identifier for each request in the cache. Modify the Lambda function to check the cache for the identifier before processing the request.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 69

A developer needs to perform geographic load testing of an API. The developer must deploy resources to multiple AWS Regions to support the load testing of the API.

How can the developer meet these requirements without additional application code?

  • A. Create and deploy an AWS Lambda function in each desired Region. Configure the Lambda function to create a stack from an AWS CloudFormation template in that Region when the function is invoked.
  • B. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI create-stack-set command to create a stack set in the desired Regions.
  • C. Create an AWS Systems Manager document that defines the resources. Use the document to create the resources in the desired Regions.
  • D. Create an AWS CloudFormation template that defines the load test resources. Use the AWS CLI deploy command to create a stack from the template in each Region.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 70

A company has deployed infrastructure on AWS. A development team wants to create an AWS Lambda function that will retrieve data from an Amazon Aurora database. The Amazon Aurora database is in a private subnet in company’s VPC. The VPC is named VPC1. The data is relational in nature. The Lambda function needs to access the data securely.

Which solution will meet these requirements?

  • A. Create the Lambda function. Configure VPC1 access for the function. Attach a security group named SG1 to both the Lambda function and the database. Configure the security group inbound and outbound rules to allow TCP traffic on Port 3306.
  • B. Create and launch a Lambda function in a new public subnet that is in a new VPC named VPC2. Create a peering connection between VPC1 and VPC2.
  • C. Create the Lambda function. Configure VPC1 access for the function. Assign a security group named SG1 to the Lambda function. Assign a second security group named SG2 to the database. Add an inbound rule to SGI to allow TCP traffic from Port 3306.
  • D. Export the data from the Aurora database to Amazon S3. Create and launch a Lambda function in VPC1. Configure the Lambda function query the data from Amazon S3.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 71

An application is using Amazon Cognito user pools and identity pools for secure access. A developer wants to integrate the user-specific file upload and download features in the application with Amazon S3. The developer must ensure that the files are saved and retrieved in a secure manner and that users can access only their own files. The file sizes range from 3 KB to 300 M3.

Which option will meet these requirements with the HIGHEST level of security?

  • A. Use S3 Event Notifications to validate the file upload and download requests and update the user interface. (UI).
  • B. Save the details of the uploaded files in a separate Amazon DynamoDB table. Filter the list of files in the user interface (UI) by comparing the current user ID with the user It) associated with the file in the table.
  • C. Use Amazon API Gateway and an AWS Lambda function to upload and download files. Validate each request in the Lambda function before performing the requested operation.
  • D. Use an IAM policy within the Amazon identity prefix to restrict users to use their own folders in Amazon S3.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 72

A company is migrating an on-premises database to Amazon RDS for MySQL. The company has read heavy workloads. The company wants to refactor the code to achieve optimum read performance for queries.

Which solution will meet this requirement with LEAST current and future effort?

  • A. Use a mufti-AZ Amazon RDS deployment. Increase the number of connections that the code makes to the database or increase the connection pool size if a connection pool is in use.
  • B. Use a multi-AZ Amazon RDS deployment. Modify the code so that queries access the secondary RDS instance.
  • C. Deploy Amazon RDS with one or more read replicas. Modify the application code so that queries use the URL for the read replicas.
  • D. Use open source replication software to create a of the MySQL database on an Amazon EC2 instance. Modify the application so that queries use the IP address of the EC2 instance.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 73

A company is an application on Amazon EC2 instances. The application needs to incoming transactions. When the application detects a transaction that is not valid, the application must send a chat message to the company’s team. To send the message, the application needs to retrieve the token to authenticate by using the chat API.

A developer needs to implement a solution to store the access token. The access token must be at rest and in transit. The access token must also be accessible from other AWS accounts.

Which solution will meet these requirements with the LEAST management overhead?

  • A. Use an AWS Systems Manager Parameter Store SecureString parameter that uses an AWS Key Management Service (AWS KMS) AWS managed key to store the access token. Add a based policy to the parameter to allow access from. other accounts. Update the IAM role of EC2 instances with permissions to access Parameter Store. Retrieve the token from Parameter Store with decrypt flag enabled. Use the decrypted access token to send the message to the chat.
  • B. Encrypt the token by using an AWS Key Management Service (AWS KMS) customer managed key. Store the access token in an Amazon DynamoDB table. Update the IAM role of the EC2 instances with permissions to access DynamoDB and AWS KMS. Retrieve the token from DynamoDB. Decrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
  • C. Use AWS Secrets Manager with an AWS Key Management Service (AWS KMS) customer managed key to store the access token. Add a resource-based to the secret to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to Secrets Manager. Retrieve the token from Secrets Manager. Use the decrypted access token to send the message to the chat.
  • D. Encrypt access token by using an AWS Key Management Service (AWS KMS) AWS managed key. Store access token in an Amazon S3 bucket Add a bucket to the S3 bucket to allow access from other accounts. the IAM role of the EC2 instances with permissions to access Amazon S3 and AWS KMS. Retrieve the token from the S3 bucket. Decrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 74

A developer is creating an AWS Lambda function that needs credentials to connect to an Amazon RDS for MySQL database. An Amazon S3 bucket currently stores the credentials. The developer needs to improve the existing solution by implementing credential rotation and secure storage. The developer also needs to provide integration with the Lambda function.

Which solution should the developer use to store and retrieve the credentials with the LEAST management overhead?

  • A. Store the credentials in AWS Systems Manager Parameter Store. Select the database that the parameter will access. Use the default AWS Key Management Service (AWS KMS) key to encrypt the parameter. Enable automatic rotation for the parameter. Use the parameter from Parameter Store on the Lambda function to connect to the database.
  • B. Encrypt the credentials with default AWS Key Management Service (AWS KMS) key. Store the credentials as environment variables for the Lambda function. Create a second Lambda function to generate new credentials and to rotate the credentials by updating the environment variables of the first Lambda function. Invoke second Lambda function by using an Amazon EventBridge rule that runs on a schedule. Update the database to use the new credentials. On the first Lambda function, retrieve the credentials from the environment variables. Decrypt the credentials by using AWS KMS. Connect to the database.
  • C. Store the credentials in AWS Secrets Manager. Set the secret to Credentials for Amazon RDS database. Select the database that the secret will access. Use default AWS Key Management Service (AWS KMS) key to encrypt the secret. Enable automatic rotation for the secret. Use the secret from Secrets Manager on the Lambda function to connect to the database.
  • D. Encrypt the credentials by using AWS Key Management Service (AWS KMS). Store the credentials in an Amazon DynamoDB table. Create a second Lambda function to rotate the credentials. Invoke the second Lambda function by using an Amazon EventBridge rule that runs on a schedule. Update the DynamoDB table. the database to use the generated credentials. Retrieve the credentials from DynamoDB with the first function. Connect to the database.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 75

A company is planning to securely manage one-time fixed keys in AWS. The company’s development team to the license keys in automation scripts that run in Amazon EC2 instances and in AWS CloudFormation stacks.

Which solution will meet these requirements MOST cost-effectively?

  • A. Amazon S3 with encrypted files with “config”.
  • B. AWS Secrets Manager secrets with a tag that is named SecretString.
  • C. AWS Systems Manager Parameter Store SecureString parameters
  • D. CloudFormation NoEcho parameters.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 76

A developer has an application that stores data in an Amazon S3 bucket. The application uses an HTTP API to store and retrieve objects. When the PutObjectAPl operation adds objects to the S3 bucket, the developer must encrypt these objects at rest by using server-side encryption with Amazon S3 managed keys (SSE-S3).

Which solution will meet this requirement?

  • A. Create an AWS Key Management Service (AWS KMS) key. Assign the KMS key to the S3 bucket.
  • B. Set the x-amz-server-side-encryption header when invoking the PutObject API operation.
  • C. Provide the encryption key in the HTTP header of every request.
  • D. Apply TLS to encrypt the traffic to the S3 bucket.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 77

A developer is working on an existing application that uses Amazon DynamoDB as its data store. The DynamoDB table has the following attributes: partNumber (partition key), vendor (sort key), description, productFamily, and productType. When the developer analyzes the usage patterns, the notices that there are application modules that frequently look for a list of products based on the and productType attributes.

The developer wants to make changes to the application to improve performance of the query operations.

Which solution will meet these requirements?

  • A. Create a global secondary index (GSI) with productFamily as the partition key and productType as the sort key.
  • B. Create a loc.al secondary index (LSI) with productFamily as the partition key and as the sort key.
  • C. Recreate the table. Add partNumber as the partition key and vendor as the sort key. During table creation, add a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
  • D. Update the queries to use Scan operations with productFamily as the partition key and productType as the sort key.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 78

A developer needs to store configuration variables for an application. The developer needs to set an expiration date and time for the configuration. The developer wants to receive notifications before the configuration expires.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Create a standard parameter in AWS Systems Manager Parameter Store. Set Expiration and ExpirationNotification policy types.
  • B. Create a standard parameter in AWS Systems Manager Parameter Store. Create an AWS Lambda function to expire the configuration and to send Amazon Simple Notification Service (Amazon SNS) notifications.
  • C. Create an advanced parameter in AWS Systems Manager Parameter Store. Set Expiration and ExpirationNotification plicy types.
  • D. Create an advanced parameter in AWS Systems Manager Parameter Store. Create an Amazon EC2 instance with a cron job to expire the configuration and to send notifications.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 79

A company is building a web application on AWS. When a customer sends a request, the application will generate reports and then make the reports available to the customer within one hour. Reports should be accessible to the customer for 8 hours. Some reports are larger than 1 MB. Each report is unique to the customer. The application should delete all reports that are older than 2 days.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Generate the reports and then store the reports as Amazon DynamoDB items that have a specified TTL. Generate a URL that retrieves the reports from DynamoDB. Provide the URL to customers through the web application.
  • B. Generate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Attach the reports to an Amazon Simple Notification Service (Amazon SNS) message. Subscribe the customer to email notifications from Amazon SNS.
  • C. Generate the reports and then store the reports in an Amazon S3 bucket that uses server-side encryption. Generate a presigned URL that contains an expiration date. Provide the URL to customers through the web application. Add S3 Lifecycle configuration rules to the S3 bucket to delete old reports.
  • D. Generate the reports and then store the reports in an Amazon RDS database with a date stamp. Generate an URL that retrieves the reports from the RDS database. Provide the URL to customers through the web application. Schedule an hourly AWS Lambda function to delete database records that have expired date stamps.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 80

A developer is setting up a deployment pipeline. The pipeline includes an AWS CodeBuild build stage that requires access to a database to run integration tests. The developer is using a buildspec.yml file to configure the database connection. Company policy requires automatic rotation of all database credentials.

Which solution will handle the database credentials MOST securely?

  • A. Retrieve the credentials from variables that are hardcoded in the buildspec.yml file. Configure an AWS Lambda function to rotate the credentials.
  • B. Retrieve the credentials from an environment variable that is linked to a SecureString parameter in AWS Systems Manager Parameter Store. Configure Parameter Store for automatic rotation.
  • C. Retrieve the credentials from an environment variable that is linked to an AWS Secrets Manager secret. Configure Secrets Manager for automatic rotation.
  • D. Retrieve the credentials from an environment variable that contains the connection string in plaintext. Configure an Amazon EventBridge event to rotate the credentials.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 81

A company has a multi-node Windows legacy application that runs on premises. The application uses a network shared folder as a centralized configuration repository to store configuration files in .xml format. The company is migrating the application to Amazon EC2 instances. As part of the migration to AWS, a developer must identify a solution that provides high availability for the repository.

Which solution will meet this requirement MOST cost-effectively?

  • A. Mount an Amazon Elastic Block Store (Amazon EBS) onto one of the EC2 instances. a file system on the EBS volume. Use the host system to share a folder. the application code to read and write configuration files from the shared folder.
  • B. Deploy a micro EC2 instance with an instance store volume. Use the host operating system to share a folder the application code to read and write configuration files from the shared folder.
  • C. Create an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Update application code to use the AWS SDK to read and write configuration files from Amazon S3.
  • D. Create an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Mount the S3 bucket to the EC2 instances as a local volume. the application code to read and write configuration files from the disk.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 82

A company is implementing an application on Amazon EC2 instances. The application needs to process incoming transactions. When the application detects a transaction that is not valid, the application must send a chat message to the company’s support team. To send the message, the application needs to retrieve the access token to authenticate by using the chat API.

A developer needs to implement a solution to store the access token. The access token must be encrypted at rest and in transit. The access token must also be accessible from other AWS accounts.

Which solution will meet these requirements with the LEAST management overhead?

  • A. Use an AWS Systems Manager Parameter Store SecureString parameter that uses an AWS Key Management Service (AWS KMS) AWS managed key to store the access token. Add a resource-based policy to the parameter to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Parameter Store. Retrieve the token from Parameter Store with the decrypt flag enabled. Use the decrypted access token to send the message to the chat.
  • B. Encrypt the access token by using an AWS Key Management Service (AWS KMS) customer managed key. Store the access token in an Amazon DynamoDB table. Update the IAM role of the EC2 instances with permissions to access DynamoDB and AWS KMS. Retrieve the token from DynamoDecrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
  • C. Use AWS Secrets Manager with an AWS Key Management Service (AWS KMS) customer managed key to store the access token. Add a resource-based policy to the secret to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Secrets Manager. Retrieve the token from Secrets Manager. Use the decrypted access token to send the message to the chat.
  • D. Encrypt the access token by using an AWS Key Management Service (AWS KMS) AWS managed key. Store the access token in an Amazon S3 bucket. Add a bucket policy to the S3 bucket to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Amazon S3 and AWS KMS. Retrieve the token from the S3 bucket. Decrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 83

A developer has written code for an application and wants to share it with other developers on the team to receive feedback. The shared application code needs to be stored long-term with multiple versions and batch change tracking.

Which AWS service should the developer use?

  • A. AWS CodeBuild
  • B. Amazon S3
  • C. AWS CodeCommit
  • D. AWS Cloud9
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 84

A developer maintains a critical business application that uses Amazon DynamoDB as the primary data store. The DynamoDB table contains millions of documents and receives 30-60 requests each minute. The developer needs to perform processing in near-real time on the documents when they are added or updated in the DynamoDB table.

How can the developer implement this feature with the LEAST amount of change to the existing application code?

  • A. Set up a cron job on an Amazon EC2 instance. Run a script every hour to query the table for changes and process the documents.
  • B. Enable a DynamoDB stream on the table. Invoke an AWS Lambda function to process the documents.
  • C. Update the application to send a PutEvents request to Amazon EventBridge (Amazon CloudWatch Events). Create an EventBridge (CloudWatch Events) rule to invoke an AWS Lambda function to process the documents.
  • D. Update the application to synchronously process the documents directly after the DynamoDB write.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 85

A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI). The company uses AWS CloudFormation to provision the application. The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region.

An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead.

Which solution meets these requirements?

  • A. Change the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
  • B. Copy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI. Relaunch the stack.
  • C. Build the custom AMI in us-west-1. Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID.
  • D. Manually deploy the application outside AWS CloudFormation in us-west-1.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 86

A company’s new mobile app uses Amazon API Gateway. As the development team completes a new release of its APIs, a developer must safely and transparently roll out the API change.

What is the SIMPLEST solution for the developer to use for rolling out the new API version to a limited number of users through API Gateway?

  • A. Create a new API in API Gateway. Direct a portion of the traffic to the new API using an Amazon Route 53 weighted routing policy.
  • B. Validate the new API version and promote it to production during the window of lowest expected utilization.
  • C. Implement an Amazon CloudWatch alarm to trigger a rollback if the observed HTTP 500 status code rate exceeds a predetermined threshold.
  • D. Use the canary release deployment option in API Gateway. Direct a percentage of the API traffic using the canarySettings setting.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 87

A developer is working on an ecommerce website. The developer wants to review server logs without logging in to each of the application servers individually. The website runs on multiple Amazon EC2 instances, is written in Python, and needs to be highly available.

How can the developer update the application to meet these requirements with MINIMUM changes?

  • A. Rewrite the application to be cloud native and to run on AWS Lambda, where the logs can be reviewed in Amazon CloudWatch.
  • B. Set up centralized logging by using Amazon Elasticsearch Service (Amazon ES), Logstash, and Kibana.
  • C. Scale down the application to one larger EC2 instance where only one instance is recording logs.
  • D. Install the unified Amazon CloudWatch agent on the EC2 instances. Configure the agent to push the application logs to CloudWatch.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 88

A developer is creating a Ruby application and needs to automate the deployment, scaling, and management of an environment without requiring knowledge of the underlying infrastructure.

Which service would best accomplish this task?

  • A. AWS CodeDeploy
  • B. AWS CloudFormation
  • C. AWS OpsWorks
  • D. AWS Elastic Beanstalk
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 89

A developer is building a highly secure healthcare application using serverless components. This application requires writing temporary data to /tmp storage on an AWS Lambda function.

How should the developer encrypt this data?

  • A. Enable Amazon EBS volume encryption with an AWS KMS CMK in the Lambda function configuration so that all storage attached to the Lambda function is encrypted.
  • B. Set up the Lambda function with a role and key policy to access an AWS KMS CMK. Use the CMK to generate a data key used to encrypt all data prior to writing to /tmp storage.
  • C. Use OpenSSL to generate a symmetric encryption key on Lambda startup. Use this key to encrypt the data prior to writing to /tmp storage.
  • D. Use an on-premises hardware security module (HSM) to generate keys, where the Lambda function requests a data key from the HSM and uses that to encrypt data on all requests to the function.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 90

A company is planning to deploy an application on AWS behind an Elastic Load Balancer. The application uses an HTTP/HTTPS listener and must access the client IP addresses.

Which load-balancing solution meets these requirements?

  • A. Use an Application Load Balancer and the X-Forwarded-For headers.
  • B. Use a Network Load Balancer (NLB). Enable proxy protocol support on the NLB and the target application.
  • C. Use an Application Load Balancer. Register the targets by the instance ID.
  • D. Use a Network Load Balancer and the X-Forwarded-For headers.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 91

A developer deployed an application to an Amazon EC2 instance. The application needs to know the public IPv4 address of the instance.

How can the application find this information?

  • A. Query the instance metadata from http://169.254.169.254/latest/meta-data/.
  • B. Query the instance user data from http://169.254.169.254/latest/user-data/.
  • C. Query the Amazon Machine Image (AMI) information from http://169.254 169.254/latest/meta-data/ami/.
  • D. Check the hosts file of the operating system.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 92

A developer has written an application that runs on Amazon EC2 instances. The developer is adding functionality for the application to write objects to an Amazon S3 bucket.

Which policy must the developer modify to allow the instances to write these objects?

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

Correct Option: A

QUESTION 93

A company is using an Amazon API Gateway REST API endpoint as a webhook to publish events from an on-premises source control management (SCM) system to Amazon EventBridge (Amazon CloudWatch Events). The company has configured an EventBridge (CloudWatch Events) rule to listen for the events and to control application deployment in a central AWS account. The company needs to receive the same events across multiple receiver AWS accounts.

How can a developer meet these requirements without changing the configuration of the SCM system?

  • A. Deploy the API Gateway REST API to all the required AWS accounts. Use the same custom domain name for all the gateway endpoints so that a single SCM webhook can be used for all events from all accounts.
  • B. Deploy the API Gateway REST API to all the receiver AWS accounts. Create as many SCM webhooks as the number of AWS accounts.
  • C. Grant permission to the central AWS account for EventBridge (CloudWatch Events)to access the receiver AWS accounts. Add an EventBridge (CloudWatch Events) event bus on the receiver AWS accounts as the targets to the existing EventBridge (CloudWatch Events) rule.
  • D. Convert the API Gateway type from REST API to HTTP API.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 94

A company caches session information for a web application in an Amazon DynamoDB table. The company wants an automated way to delete old items from the table.

What is the simplest way to do this?

  • A. Write a script that deletes old records; schedule the scripts as a cron job on an Amazon EC2 instance.
  • B. Add an attribute with the expiration time; enable the Time To Live feature based on that attribute.
  • C. Each day, create a new table to hold session data; delete the previous day's table.
  • D. Add an attribute with the expiration time; name the attribute ItemExpiration.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 95

A developer wants to debug an application by searching and filtering log data. The application logs are stored in Amazon CloudWatch Logs. The developer creates a new metric filter to count exceptions in the application logs. However, no results are returned from the logs.

What is the reason that no filtered results are being returned?

  • A. A setup of the Amazon CloudWatch interface VPC endpoint is required for filtering the CloudWatch Logs in the VPC.
  • B. CloudWatch Logs only publishes metric data for events that happen after the filter is created.
  • C. The log group for CloudWatch Logs should be first streamed to Amazon OpenSearch Service before metric filtering returns the results.
  • D. Metric data points for logs groups can be filtered only after they are exported to an Amazon S3 bucket.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 96

A company is planning to securely manage one-time fixed license keys in AWS. The company’s development team needs to access the license keys in automation scripts that run in Amazon EC2 instances and in AWS CloudFormation stacks.

Which solution will meet these requirements MOST cost-effectively?

  • A. Amazon S3 with encrypted files prefixed with "config"
  • B. AWS Secrets Manager secrets with a tag that is named SecretString
  • C. AWS Systems Manager Parameter Store SecureString parameters
  • D. CloudFormation NoEcho parameters
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 97

A developer is creating an application that includes an Amazon API Gateway REST API in the us-east-2 Region. The developer wants to use Amazon CloudFront and a custom domain name for the API. The developer has acquired an SSL/TLS certificate for the domain from a third-party provider.

How should the developer configure the custom domain for the application?

  • A. Import the SSL/TLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS A record for the custom domain.
  • B. Import the SSUTLS certificate into CloudFront. Create a DNS CNAME record for the custom domain.
  • C. Import the SSUTLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS CNAME record for the custom domain.
  • D. Import the SSUTLS certificate into AWS Certificate Manager (ACM) in the us-east-I Region. Create a DNS CNAME record for the custom domain.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 98

A company is building a serverless application on AWS. The application uses an AWS Lambda function to process customer orders 24 hours a day. 7 days a week. The Lambda function calls an external vendor’s HTTP API to process payments.

During load tests. a developer discovers that the external vendor payment processing API occasionally times out and returns errors. The company expects that some payment processing API calls will return errors.

The company wants the support team to receive notifications in near real time only when the payment processing external API error rate exceed 5% of the total number of transactions in an hour. Developers need to use an existing Amazon Simple Notification Service (Amazon SNS) topic that is configured to notify the support team.

Which solution will meet these requirements?

  • A. Write the results of payment processing API calls to Amazon CloudWatch. Use Amazon CloudWatch Logs Insights to query the CloudWatch logs. Schedule the Lambda function to check the CloudWatch logs and notify the existing SNS topic.
  • B. Publish custom metrics to CloudWatch that record the failures of the external payment processing API calls. Configure a CloudWatch alarm to notify the existing SNS topic when error rate exceeds the specified rate.
  • C. Publish the results of the external payment processing API calls to a new Amazon SNS topic. Subscribe the support team members to the new SNS topic.
  • D. Write the results of the external payment processing API calls to Amazon S3. Schedule an Amazon Athena query to run at regular intervals. Configure Athena to send notifications to the existing SNS topic when the error rate exceeds the specified rate.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 99

A developer is configuring the deployment of updates to an Amazon Elastic Container Service (Amazon ECS) application. The ECS application has an Application Load Balancer (ALB) with two target groups and one listener. The developer has configured an AppSpec file and has stored the AppSpec file in an Amazon S3 bucket. The developer has also associated the ALB and the AppSpec file with an AWS CodeDeploy deployment group.

The developer wants to add a step that uses an AWS Lambda function to validate the updates before production deployment. The developer has created the Lambda function and has included the necessary validation logic.

Which solution will meet these requirements?

  • A. Add a test listener to the deployment group. Set the test listener port for the ALB to the protocol and port values that were named during creation of the test listener. Update the AppSpec file to associate the Lambda function with the Afterlnstall lifecycle hook.
  • B. Add a test listener to the ALB. Set the test listener port for the deployment group to the protocol and port values that were named during creation of the test listener. Update the AppSpec file to associate the Lambda function with the BeforeAllowTraffic lifecycle hook.
  • C. Add a test listener to the deployment group. Set the test listener port for the ALB to the protocol and port values that were named during creation of the test listener. Update the AppSpec file to associate the Lambda function with the BeforeAllowTraffic lifecycle hook.
  • D. Add a test listener to the ALB. Set the test listener port for the deployment group to the protocol and port values that were named during creation of the test listener. Update the AppSpec file to associate the Lambda function with the Afterlnstall lifecycle hook.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 100 (Multi-Select)

A development team maintains a web application by using a single AWS CloudFormation template. The template defines web servers and an Amazon RDS database. The team uses the CloudFormation template to deploy the CloudFormation stack to different environments.

During a recent application deployment. a developer caused the primary development database to be dropped and recreated. The result of this incident was a loss of data. The team needs to avoid accidental database deletion in the future.

Which solutions will meet these requirements? (Select TWO.)

  • A. Add a CloudFormation DeletionPolicy attribute with the Retain value to the database resource.
  • B. Update the CloudFormation stack policy to prevent updates to the database.
  • C. Modify the database to use a Multi-AZ deployment.
  • D. Create a CloudFormation stack set for the web application and database deployments.
  • E. Add a CloudFormation DeletionPolicy attribute with the Retain value to the stack.
Click to View Verified Solution & Explanation

Correct Option: A,B

QUESTION 101

A company runs an application on AWS. The company deployed the application on Amazon EC2 instances. The application stores data on Amazon Aurora.

The application recently logged multiple application-specific custom DECRYP_ERROR errors to Amazon CloudWatch logs. The company did not detect the issue until the automated tests that run every 30 minutes failed. A developer must implement a solution that will monitor for the custom errors and alert a development team in real time when these errors occur in the production environment.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Configure the application to create a custom metric and to push the metric to CloudWatch. Create an AWS CloudTrail alarm. Configure the CloudTrail alarm to use an Amazon Simple Notification Service (Amazon SNS) topic to send notifications.
  • B. Create an AWS function to run every 5 minutes to scan the CloudWatch logs for the keyword DECRYP ERROR. Configure the Lambda function to use Amazon Simple Notification Service (Amazon SNS) to send a notification.
  • C. Use Amazon CloudWatch Logs to create a metric filter that has a filter pattern for DECRYP_ERROR. Create a CloudWatch alarm on this metric for a threshold >=1. Configure the alarm to send Amazon Simple Notification Service (Amazon SNS) notifications.
  • D. Install the CloudWatch unified agent on the EC2 instance. Configure the application to generate a metric for the keyword DECRYP ERROR errors. Configure the agent to send Amazon Simple Notification Service (Amazon SNS) notifications.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 102

A developer is deploying a new application to Amazon Elastic Container Service (Amazon ECS). The developer needs to securely store and retrieve different types of variables. These variables include authentication information for a remote API, the URL for the API, and credentials. The authentication information and API URL must be available to all current and future deployed versions of the application across development, testing, and production environments.

How should the developer retrieve the variables with the FEWEST application changes?

  • A. Update the application to retrieve the variables from AWS Systems Manager Parameter Store. Use unique paths in Parameter Store for each variable in each environment. Store the credentials in AWS Secrets Manager in each environment.
  • B. Update the application to retrieve the variables from AWS Key Management Service (AWS KMS). Store the API URL and credentials as unique keys for each environment.
  • C. Update the application to retrieve the variables from an encrypted file that is stored with the application. Store the API URL and credentials in unique files for each environment.
  • D. Update the application to retrieve the variables from each of the deployed environments. Define the authentication information and API URL in the ECS task definition as unique names during the deployment process.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 103

A developer is writing an application to analyze the traffic to a fleet of Amazon EC2 instances. The EC2 instances run behind a public Application Load Balancer (ALB). An HTTP server runs on each of the EC2 instances, logging all requests to a log file.

The developer wants to capture the client public IP addresses. The developer analyzes the log files and notices only the IP address of the ALB.

What must the developer do to capture the client public IP addresses in the log file?

  • A. Add a Host header to the HTTP server log configuration file.
  • B. Install the Amazon CloudWatch Logs agent on each EC2 instance. Configure the agent to write to the log file.
  • C. Install the AWS X-Ray daemon on each EC2 instance. Configure the daemon to write to the log file.
  • D. Add an X-Forwarded-For header to the HTTP server log configuration file.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 104

A company receives food orders from multiple partners. The company has a microservices application that uses Amazon API Gateway APIs with AWS Lambda integration. Each partner sends orders by calling a customized API that is exposed through API Gateway. The API call invokes a shared Lambda function to process the orders.

Partners need to be notified after the Lambda function processes the orders. Each partner must receive updates for only the partner’s own orders. The company wants to add new partners in the future with the fewest code changes possible.

Which solution will meet these requirements in the MOST scalable way?

  • A. Create a different Amazon Simple Notification Service (Amazon SNS) topic for each partner. Configure the Lambda function to publish messages for each partner to the partner's SNS topic.
  • B. Create a different Lambda function for each partner. Configure the Lambda function to notify each partner's service endpoint directly.
  • C. Create an Amazon Simple Notification Service (Amazon SNS) topic. Configure the Lambda function to publish messages with specific attributes to the SNS topic. Subscribe each partner to the SNS topic. Apply the appropriate filter policy to the topic subscriptions.
  • D. Create one Amazon Simple Notification Service (Amazon SNS) topic. Subscribe all partners to the SNS topic.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 105 (Multi-Select)

A developer is configuring an application’s deployment environment in AWS CodePipeline. The application code is stored in a GitHub repository. The developer wants to ensure that the repository package’s unit tests run in the new deployment environment. The developer has already set the pipeline’s source provider to GitHub and has specified the repository and branch to use in the deployment.

Which combination of steps should the developer take next to meet these requirements with the LEAST overhead? (Select TWO.)

  • A. Create an AWS CodeCommit project. Add the repository package's build and test commands to the project's buildspec.
  • B. Create an AWS CodeBuiId project. Add the repository package's build and test commands to the project's buildspec.
  • C. Create an AWS CodeDeploy project. Add the repository package's build and test commands to the project's buildspec.
  • D. Add an action to the source stage. Specify the newly created project as the action provider. Specify the build artifact as the action's input artifact.
  • E. Add a new stage to the pipeline after the source stage. Add an action to the new stage. Specify the newly created project as the action provider. Specify the source artifact as the action's input artifact.
Click to View Verified Solution & Explanation

Correct Option: B,E

QUESTION 106

An organization is storing large files in Amazon S3, and is writing a web application to display meta-data about the files to end-users. Based on the metadata a user selects an object to download. The organization needs a mechanism to index the files and provide single-digit millisecond latency retrieval for the metadata.

What AWS service should be used to accomplish this?

  • A. Amazon DynamoDB
  • B. Amazon EC2
  • C. AWS Lambda
  • D. Amazon RDS
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 107 (Multi-Select)

A developer is developing an application that uses signed requests (Signature Version 4) to call other AWS services. The developer has created a canonical request, has created the string to sign, and has calculated signing information.

Which methods could the developer use to complete a signed request? (Choose two.)

  • A. Add the signature to an HTTP header that is named Authorization
  • B. Add the signature to a session cookie
  • C. Add the signature to an HTTP header that is named Authentication
  • D. Add the signature to a query string parameter that is named X-Amz-Signature
  • E. Add the signature to an HTTP header that is named WWW-Authenticate
Click to View Verified Solution & Explanation

Correct Option: A,D

QUESTION 108

A developer has created an AWS Lambda function to provide notification through Amazon Simple Notification Service (Amazon SNS) whenever a file is uploaded to Amazon S3 that is larger than 50 MB. The developer has deployed and tested the Lambda function by using the CLI. However, when the event notification is added to the S3 bucket and a 3,000 MB file is uploaded, the Lambda function does not launch.

Which of the following is a possible reason for the Lambda function’s inability to launch?

  • A. The S3 event notification does not activate for files that are larger than 1,000 MB.
  • B. The resource-based policy for the Lambda function does not have the required permissions to be invoked by Amazon S3.
  • C. Lambda functions cannot be invoked directly from an S3 event.
  • D. The S3 bucket needs to be made public.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 109

A developer wants to use AWS Elastic Beanstalk to test a new version of on application in a test environment.

Which deployment method offers the FASTEST deployment?

  • A. Immutable
  • B. Rolling
  • C. Rolling with additional batch
  • D. All at once
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 110

An application under development is required to store hundreds of video files. The data must be encrypted within the application prior to storage, with a unique key for each video file.

How should the Developer code the application?

  • A. Use the KMS Encrypt API to encrypt the data. Store the encrypted data key and data.
  • B. Use a cryptography library to generate an encryption key for the application. Use the encryption key to encrypt the data. Store the encrypted data.
  • C. Use the KMS GenerateDataKey API to get a data key. Encrypt the data with the data key. Store the encrypted data key and data.
  • D. Upload the data to an S3 bucket using server side-encryption with an AWS KMS key.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 111

A company’s developer is building a static website to be deployed in Amazon S3 for a production environment. The website integrates with an Amazon Aurora PostgreSQL database by using an AWS Lambda function. The website that is deployed to production will use a Lambda alias that points to a specific version of the Lambda function.

The company must rotate the database credentials every 2 weeks. Lambda functions that the company deployed previously must be able to use the most recent credentials.

Which solution will meet these requirements?

  • A. Store the database credentials in AWS Secrets Manager. Turn on rotation. Write code in the Lambda function to retrieve the credentials from Secrets Manager.
  • B. Include the database credentials as part of the Lambda function code. Update the credentials periodically and deploy the new Lambda function.
  • C. Use Lambda environment variables. Update the environment variables when new credentials are available.
  • D. Store the database credentials in AWS Systems Manager Parameter Store Turn on rotation. Write code in the Lambda function to retrieve the credentials from Systems Manager Parameter Store.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 112

An engineer created an A/B test of a new feature on an Amazon CloudWatch Evidently project. The engineer configured two variations of the feature (Variation A and Variation B) for the test. The engineer wants to work exclusively with Variation A. The engineer needs to make updates so that Variation A is the only variation that appears when the engineer hits the application’s endpoint.

Which solution will meet this requirement?

  • A. Add an override to the feature. Set the identifier of the override to the engineer's user ID. Set the variation to Variation A.
  • B. Add an override to the feature. Set the identifier of the override to Variation A. Set the variation to 100%.
  • C. Add an experiment to the project. Set the identifier of the experiment to Variation B. Set the variation to 0%.
  • D. Add an experiment to the project. Set the identifier of the experiment to the AWS account's account ISet the variation to Variation A.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 113

An ecommerce website uses an AWS function and an Amazon RDS for MySQL database for an order fulfillment service. The service needs to return order confirmation immediately.

During a marketing campaign that caused an increase in the number of orders. the website’s operations team noticed errors for "too many connections" from Amazon RDS. However, the RDS DB cluster metrics are healthy. CPU and memory capacity are still available.

What should a developer do to resolve the errors?

  • A. Initialize the database connection outside the handler function. Increase the max_user_connections value on the parameter group of the DB cluster. Restart the DB cluster.
  • B. Initialize the database connection outside the handler function. Use RDS Proxy instead of connecting directly to the DB cluster.
  • C. Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that equals the number of available database connections.
  • D. Use Amazon Simple Queue Service (Amazon SQS) FIFO queues to queue the orders. Ingest the orders into the database. Set the Lambda function's concurrency to a value that is less than the number of available database connections.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 114

A company moved some of its secure files to a private Amazon S3 bucket that has no public access. The company wants to develop a serverless application that gives its employees the ability to log in and securely share the files with other users.

Which AWS feature should the company use to share and access the files securely?

  • A. Amazon Cognito user pool
  • B. S3 presigned URLs
  • C. S3 bucket policy
  • D. Amazon Cognito identity pool
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 115

A company is updating an application to move the backend of the application from Amazon EC2 instances to a serverless model. The application uses an Amazon RDS for MySQL DB instance and runs in a single VPC on AWS. The application and the DB instance are deployed in a private subnet in the VPC.

The company needs to connect AWS Lambda functions to the DB instance.

Which solution will meet these requirements?

  • A. Create Lambda functions inside the VPC with the AWSLambdaBasicExecutionRole policy attached to the Lambda execution role. Modify the RDS security group to allow inbound access from the Lambda security group.
  • B. Create Lambda functions inside the VPC with the AWSLambdaVPCAccessExecutionRole policy attached to the execution role. Modify the RDS security group to allow inbound access from the Lambda security group.
  • C. Create Lambda functions with the AWSLambdaBasicExecutionRole policy attached to the Lambda execution role. Create an interface VPC endpoint for the Lambda functions. Configure the interface endpoint policy to allow the lambda:lnvokeFunction action for each Lambda function's Amazon Resource Name (ARN).
  • D. Create Lambda functions with the AWSLambdaVPCAccessExecutionRole policy attached to the Lambda execution role. Create an interface VPC endpoint for the functions. Configure the interface endpoint policy to allow the lambda:lnvokeFunction action for each Lambda function's Amazon Resource Name (ARN).
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 116

A developer is building an application that uses Amazon DynamoDB. The developer wants to retrieve multiple specific items from the database with a single API call.

Which DynamoDB API call will meet these requirements with the MINIMUM impact on the database?

  • A. BatchGetltem
  • B. Getltem
  • C. Scan
  • D. Query
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 117

A company is developing a serverless application that consists of various AWS Lambda functions behind Amazon API Gateway APIs. A developer needs to automate the deployment of Lambda function code. The developer will deploy updated Lambda functions with AWS CodeDeploy. The deployment must minimize the exposure of potential errors to end users. When the application is in production. the application cannot experience downtime outside the specified maintenance window.

Which deployment configuration will meet these requirements with the LEAST deployment time?

  • A. Use the AWS CodeDeploy in-place deployment configuration for the Lambda functions. Shift all traffic immediately after deployment.
  • B. Use the AWS CodeDeploy linear deployment configuration to shift 10% of the traffic every minute.
  • C. Use the AWS CodeDeploy all-at-once deployment configuration to shift all traffic to the updated versions immediately.
  • D. Use the AWS CodeDeploy predefined canary deployment configuration to shift 10% of the traffic immediately and shift the remaining traffic after 5 minutes.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 118

A company has an AWS Lambda function that processes incoming requests from an Amazon API Gateway API. The API calls the Lambda function by using a Lambda alias. A developer updated the Lambda function code to handle more details related to the incoming requests. The developer wants to deploy the new Lambda function for more testing by other developers with no impact to customers that use the API.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Create a new version of the Lambda function. Create a new stage on API Gateway with integration to the new Lambda version. Use the new API Gateway stage to test the Lambda function.
  • B. Update the existing Lambda alias used by API Gateway to a weighted alias. Add the new Lambda version as an additional Lambda function with a weight of 10%. Use the existing API Gateway stage for testing.
  • C. Create a new version of the Lambda function. Create and deploy a second Lambda function to filter incoming requests from API Gateway. If the filtering Lambda function detects a test request. the filtering Lambda function will invoke the new Lambda version of the code. For other requests, the filtering Lambda function will invoke the old Lambda version. Update the API Gateway API to use the filtering Lambda function.
  • D. Create a new version of the Lambda function. Create a new API Gateway API for testing purposes. Update the integration of the new API with the new version. Use the new API for testing.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 119

A company uses AWS Lambda functions and an Amazon S3 trigger to process images into an S3 bucket. A development team set up multiple environments in a single AWS account.

After a recent production deployment, the development team observed that the development S3 buckets invoked the production environment Lambda functions. These invocations caused unwanted execution of development S3 files by using production Lambda functions. The development team must prevent these invocations. The team must follow security best practices.

Which solution will meet these requirements?

  • A. Update the Lambda execution role for the production Lambda function to add a policy that allows the execution role to read from only the production environment S3 bucket.
  • B. Move the development and production environments into separate AWS accounts. Add a resource policy to each Lambda function to allow only S3 buckets that are within the same account to invoke the function.
  • C. Add a resource policy to the production Lambda function to allow only the production environment S3 bucket to invoke the function.
  • D. Move the development and production environments into separate AWS accounts. Update the execution role for each function to add a policy that allows the execution role to read from the S3 bucket that is within the same account.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 120

A developer is writing an application for a company. The application will be deployed on Amazon EC2 and will use an Amazon RDS for Microsoft SQL Server database. The company’s security team requires that database credentials are rotated at least weekly.

How should the developer configure the database credentials for this application?

  • A. Create a database user. Store the user name and password in an AWS Systems Manager Parameter Store secure string parameter. Enable rotation of the AWS Key Management Service (AWS KMS) key that is used to encrypt the parameter.
  • B. Enable IAM authentication for the database. Create a database user for use with IAM authentication. Enable password rotation.
  • C. Create a database user. Store the user name and password in an AWS Secrets Manager secret that has daily rotation enabled.
  • D. Use the EC2 user data to create a database user. Provide the user name and password in environment variables to the application.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 121 (Multi-Select)

A team is developing an application that is deployed on Amazon EC2 instances. During testing. the team receives an error. The EC2 instances are unable to access an Amazon S3 bucket.

Which steps should the team take to troubleshoot this issue? (Select TWO.)

  • A. Check whether the policy that is assigned to the IAM role that is attached to the EC2 instances grants access to Amazon S3.
  • B. Check the S3 bucket policy to validate the access permissions for the S3 bucket.
  • C. Check whether the policy that is assigned to the IAM user that is attached to the EC2 instances grants access to Amazon S3.
  • D. Check the S3 Lifecycle policy to validate the permissions that are assigned to the S3 bucket.
  • E. Check the security groups that are assigned to the EC2 instances. Make sure that a rule is not blocking the access to Amazon S3.
Click to View Verified Solution & Explanation

Correct Option: A,B

Explanation:

QUESTON 122

A developer is updating several AWS Lambda functions and notices that all the Lambda functions share the same custom libraries. The developer wants to centralize all the libraries. update the libraries in a convenient way, and keep the libraries versioned.

Which solution will meet these requirements with the LEAST development effort?

A. Create an AWS CodeArtifact repository that contains all the custom libraries.

B. Create a custom container image for the Lambda functions to save all the custom libraries.

C. Create a Lambda layer that contains all the custom libraries.

D. Create an Amazon Elastic File System (Amazon EFS) file system to store all the custom libraries.

Correct Answer: C

QUESTION 122

A company has an image storage web application that runs on AWS. The company hosts the application on Amazon EC2 instances in an Auto Scaling group. The Auto Scaling group acts as the target group for an Application Load Balancer (ALB) and uses an Amazon S3 bucket to store the images for sale.

The company wants to develop a feature to test system requests. The feature will direct requests to a separate target group that hosts a new beta version of the application.

Which solution will meet this requirement with the LEAST effort?

  • A. Create a new Auto Scaling group and target group for the beta version of the application. Update the ALB routing rule with a condition that looks for a cookie named version that has a value of beta. Update the test system code to use this cookie to test the beta version of the application.
  • B. Create a new ALB. Auto Scaling group. and target group for the beta version of the application. Configure an alternate Amazon Route 53 record for the new ALB endpoint. Use the alternate Route 53 endpoint in the test system requests to test the beta version of the application.
  • C. Create a new ALB. Auto Scaling group. and target group for the beta version of the application. Use Amazon CloudFront with Lambda@Edge to determine which specific request will go to the new ALB. Use the CloudFront endpoint to send the test system requests to test the beta version of the application.
  • D. Create a new Auto Scaling group and target group for the beta version of the application. Update the ALB routing rule with a condition that looks for a cookie named version that has a value of beta. Use Amazon CloudFront with Lambda@Edge to update the test system requests to add the required cookie when the requests go to the ALB.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 123

A company must deploy all its Amazon RDS DB instances by using AWS CloudFormation templates as part of AWS CodePipeline continuous integration and continuous delivery (CI/CD) automation. The primary password for the DB instance must be automatically generated as part of the deployment process.

Which solution will meet these requirements with the LEAST development effort?

  • A. Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get the value of the secure string. Use the value to create the DB instance.
  • B. Use the AWS CodeBuild action of CodePipeline to generate a secure string by using the following AWS CLI command: aws secretsmanager get-random- password. Pass the generated secure string as a CloudFormation parameter with the NoEcho attribute set to true. Use the parameter reference to create the DB instance.
  • C. Create an AWS Lambda-backed CloudFormation custom resource. Write Lambda code that generates a secure string. Return the value of the secure string as a data field of the custom resource response object. Use the CloudFormation Fn::GetAtt intrinsic function to get a value of the secure string. Create secrets in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
  • D. Use the AWS::SecretsManager::Secret resource to generate a secure string. Store the secure string as a secret in AWS Secrets Manager. Use the secretsmanager dynamic reference to use the value stored in the secret to create the DB instance.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 124

A company has a front-end application that runs on four Amazon EC2 instances behind an Elastic Load Balancer (ELB) in a production environment that is provisioned by AWS Elastic Beanstalk. A developer needs to deploy and test new application code while updating the Elastic Beanstalk platform from the current version to a newer version of Node.js. The solution must result in zero downtime for the application.

Which solution meets these requirements?

  • A. Clone the production environment to a different platform version. Deploy the new application code. and test it. Swap the environment URLs upon verification.
  • B. Deploy the new application code in an all-at-once deployment to the existing EC2 instances. Test the code. Redeploy the previous code if verification fails.
  • C. Perform an immutable update to deploy the new application to new EC2 instances. Serve traffic to the new instances after they pass health checks.
  • D. Use a rolling deployment for the new application code. Apply the code to a subset of EC2 instances until the tests pass. Redeploy the previous code if the tests fail.
Click to View Verified Solution & Explanation

Correct Option: C

QUESTION 125

A company is providing read access to objects in an Amazon S3 bucket for different customers. The company uses IAM permissions to restrict access to the S3 bucket. The customers can access only their own files.

Due to a regulation requirement, the company needs to enforce encryption in transit for interactions with Amazon S3.

Which solution will meet these requirements?

  • A. Add a bucket policy to the S3 bucket to deny S3 actions when the aws:SecureTransport condition is equal to false.
  • B. Add a bucket policy to the S3 bucket to deny S3 actions when the s3:x-amz-acl condition is equal to public-read.
  • C. Add an IAM policy to the IAM users to enforce the usage of the AWS SDK.
  • D. Add an IAM policy to the IAM users that allows S3 actions when the s3:x-amz-acl condition is equal to bucket-owner-read.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 126 (Multi-Select)

A software company is launching a multimedia application. The application will allow guest users to access sample content before the users decide if they want to create an account to gain full access. The company wants to implement an authentication process that can identify users who have already created an account. The company also needs to keep track of the number of guest users who eventually create an account.

Which combination of steps will meet these requirements? (Select TWO.)

  • A. Create an Amazon Cognito user pool. Configure the user pool to allow unauthenticated users. Exchange user tokens for temporary credentials that allow authenticated users to assume a role.
  • B. Create an Amazon Cognito identity pool. Configure the identity pool to allow unauthenticated users. Exchange unique identity for temporary credentials that allow all users to assume a role.
  • C. Create an Amazon CloudFront distribution. Configure the distribution to allow unauthenticated users. Exchange user tokens for temporary credentials that allow all users to assume a role.
  • D. Create a role for authenticated users that allows access to all content. Create a role for unauthenticated users that allows access to only the sample content.
  • E. Allow all users to access the sample content by default. Create a role for authenticated users that allows access to the other content.
Click to View Verified Solution & Explanation

Correct Option: B,D

QUESTION 127

A developer has designed an application to store incoming data as JSON files in Amazon S3 objects. Custom business logic in an AWS Lambda function then transforms the objects. and the Lambda function loads the data into an Amazon DynamoDB table. Recently. the workload has experienced sudden and significant changes in traffic. The flow of data to the DynamoDB table is becoming throttled.

The developer needs to implement a solution to eliminate the throttling and load the data into the DynamoDB table more consistently.

Which solution will meet these requirements?

  • A. Refactor the Lambda function into two functions. Configure one function to transform the data and one function to load the data into the DynamoDB table. Create an Amazon Simple Queue Service (Amazon SQS) queue in between the functions to hold the items as messages and to invoke the second function.
  • B. Turn on auto scaling for the DynamoDB table. Use Amazon CloudWatch to monitor the table's read and write capacity metrics and to track consumed capacity.
  • C. Create an alias for the Lambda function. Configure provisioned concurrency for the application to use.
  • D. Refactor the Lambda function into two functions. Configure one function to store the data in the DynamoDB table. Configure the second function to process the data and update the items after the data is stored in DynamoDB. Create a DynamoDB stream to invoke the second function after the data is stored.
Click to View Verified Solution & Explanation

Correct Option: D

QUESTION 128 (Multi-Select)

A company is creating an application that processes .csv files from Amazon S3. A developer has created an S3 bucket. The developer has also created an AWS Lambda function to process the .csv files from the S3 bucket.

Which combination of steps will invoke the Lambda function when a .csv file is uploaded to Amazon S3? (Select TWO.)

  • A. Create an Amazon EventBridge rule. Configure the rule with a pattern to match the S3 object created event.
  • B. Schedule an Amazon EventBridge rule to run a new Lambda function to scan the S3 bucket.
  • C. Add a trigger to the existing Lambda function. Set the trigger to EventBridge. Select the Amazon EventBridge rule.
  • D. Create a new Lambda function to scan the S3 bucket for recently added S3 objects.
  • E. Add S3 Lifecycle rules to invoke the existing Lambda function.
Click to View Verified Solution & Explanation

Correct Option: A,C

QUESTION 129 (Multi-Select)

Users are reporting errors in an application. The application consists of several microservices that are deployed on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate.

Which combination of steps should a developer take to fix the errors? (Select TWO.)

  • A. Deploy AWS X-Ray as a sidecar container to the microservices. Update the task role policy to allow access to the X-Ray API.
  • B. Deploy AWS X-Ray as a daemonset to the Fargate cluster Update the service role policy to allow to the X-Ray API.
  • C. Instrument the application by using the AWS X-Ray SDK. Update the application to use the PutXrayTrace API call to communicate with the X-Ray API.
  • D. Instrument the application by using the AWS X-Ray SDK. Update the application to with the X-Ray daemon.
  • E. Instrument the ECS task to send the stdout and stderr output to Amazon CloudWatch Logs. Update the task role policy to allow the cloudwatch:PutLogs action.
Click to View Verified Solution & Explanation

Correct Option: A,D

QUESTION 130

A developer needs to migrate an online retail application to AWS to handle an anticipated increase in traffic. The application currently runs on two servers: one server for the web application and another server for the database. The web server renders webpages and manages session state in memory. The database server hosts a MySQL database that contains order details. When traffic to the application is heavy, the memory usage for the web server approaches 100% and the application slows down considerably.

The developer has found that most of the memory increase and performance decrease is related to the load of managing additional user sessions. For the web server migration, the developer will use Amazon EC2 instances with an Auto Scaling group behind an Application Load Balancer.

Which additional set of changes should the developer make to the application to improve the application’s performance?

  • A. Use an EC2 instance to host the MySQL database. Store the session data and the application data in the MySQL database.
  • B. Use Amazon ElastiCache for Memcached to store and manage the session data. Use an Amazon RDS for MySQL DB instance to store the application data.
  • C. Use Amazon ElastiCache for Memcached to store and manage the session data and the application data.
  • D. Use the EC2 instance store to manage the session data. Use an Amazon RDS for MySQL DB instance to store the application data.
Click to View Verified Solution & Explanation

Correct Option: B

QUESTION 131

A company is developing a serverless multi-tier application on AWS. The company will build the serverless logic tier by using Amazon API Gateway and AWS Lambda. While the company builds the logic tier, a developer who works on the frontend of the application must develop integration tests. The tests must cover both positive and negative scenarios, depending on success and error HTTP status codes.

Which solution will meet these requirements with the LEAST effort?

  • A. Set up a mock integration for API methods in API Gateway. In the integration request from Method Execution, add simple logic to return either a success or error based on HTTP status code. In the integration add messages that correspond to the HTTP status codes.
  • B. Create two mock integration resources for API methods in API Gateway. In the integration request, return a success HTTP status code for one resource and an error HTTP status code for the other resource. In the integration response. add messages that correspond to the HTTP status codes.
  • C. Create Lambda functions to perform tests. Add simple logic to return either success or error, based on the HTTP status codes. Build an API Gateway Lambda integration. Select appropriate Lambda functions that correspond to the HTTP status codes.
  • D. Create a Lambda function to perform tests. Add simple logic to return either success or error-based HTTP status codes. Create a mock integration in API Gateway. Select the Lambda function that corresponds to the HTTP status codes.
Click to View Verified Solution & Explanation

Correct Option: A

QUESTION 132

A developer is creating an AWS Lambda function. The Lambda function needs an external library to connect to a third-party solution. The external library is a collection of files with a total size of 100 MB. The developer needs to make the external library available to the Lambda execution environment and reduce the Lambda package space.

Which solution will meet these requirements with the LEAST operational overhead?

  • A. Create a Lambda layer to store the external library. Configure the Lambda function to use the layer.
  • B. Create an Amazon S3 bucket. Upload the external library into the S3 bucket. Mount the S3 bucket folder in the Lambda function. Import the library by using the proper folder in the mount point.
  • C. Load the external library to the Lambda function's /tmp directory during deployment of the Lambda package. Import the library from the /tmp directory.
  • D. Create an Amazon Elastic File System (Amazon EFS) volume. Upload the external library to the EFS volume. Mount the EFS volume in the Lambda function. Import the library by using the proper folder in the mount point.
Click to View Verified Solution & Explanation

Correct Option: A

Need the Full Exam Simulator?

Practice the complete question bank in a realistic, timed environment with advanced tracking.

Access Full CertoMetrics Engine →

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top