Practice Mode

DVA-C02

Loading...

DVA-C02 — 20 free practice questions

Preview the exam for free. Unlock all 557 questions →

Question 1

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? Options: 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 DynamoDDecrypt 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 massage to the chat.
  • 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 DynamoDDecrypt 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. Correct
  • 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 massage to the chat.

Explanation

AWS Secrets Manager provides automatic rotation of secrets, encryption at rest and in transit using AWS Key Management Service (KMS), and can be accessed from other AWS accounts via resource-based policies. This solution meets all requirements with minimal management overhead compared to manually managing access tokens or using DynamoDB or S3.

Question 2

A company is running Amazon EC2 instances in multiple AWS accounts. A developer needs to implement an application that collects all the lifecycle events of the EC2 instances. The application needs to store the lifecycle events in a single Amazon Simple Queue Service (Amazon SQS) queue in the company's main AWS account for further processing. Which solution will meet these requirements? Options: A. Configure Amazon EC2 to deliver the EC2 instance lifecycle events from all accounts to the Amazon EventBridge event bus of the main account. Add an EventBridge rule to the event bus of the main account that matches all EC2 instance lifecycle events. Add the SQS queue as a target of the rule. B. Use the resource policies of the SQS queue in the main account to give each account permissions to write to that SQS queue. Add to the Amazon EventBridge event bus of each account an EventBridge rule that matches all EC2 instance lifecycle events. Add the SQS queue in the main account as a target of the rule. C. Write an AWS Lambda function that scans through all EC2 instances in the company accounts to detect EC2 instance lifecycle changes. Configure the Lambda function to write a notification message to the SQS queue in the main account if the function detects an EC2 instance lifecycle change. Add an Amazon EventBridge scheduled rule that invokes the Lambda function every minute. D. Configure the permissions on the main account event bus to receive events from all accounts. Create an Amazon EventBridge rule in each account to send all the EC2 instance lifecycle events to the main account event bus. Add an EventBridge rule to the main account event bus that matches all EC2 instance lifecycle events. Set the SQS queue as a target for the rule.
  • A. Configure Amazon EC2 to deliver the EC2 instance lifecycle events from all accounts to the Amazon EventBridge event bus of the main account. Add an EventBridge rule to the event bus of the main account that matches all EC2 instance lifecycle events. Add the SQS queue as a target of the rule.
  • B. Use the resource policies of the SQS queue in the main account to give each account permissions to write to that SQS queue. Add to the Amazon EventBridge event bus of each account an EventBridge rule that matches all EC2 instance lifecycle events. Add the SQS queue in the main account as a target of the rule.
  • C. Write an AWS Lambda function that scans through all EC2 instances in the company accounts to detect EC2 instance lifecycle changes. Configure the Lambda function to write a notification message to the SQS queue in the main account if the function detects an EC2 instance lifecycle change. Add an Amazon EventBridge scheduled rule that invokes the Lambda function every minute.
  • D. Configure the permissions on the main account event bus to receive events from all accounts. Create an Amazon EventBridge rule in each account to send all the EC2 instance lifecycle events to the main account event bus. Add an EventBridge rule to the main account event bus that matches all EC2 instance lifecycle events. Set the SQS queue as a target for the rule. Correct

Explanation

Option D is correct because it involves configuring cross-account permissions on the main account's Amazon EventBridge event bus to receive EC2 instance lifecycle events from multiple accounts. This approach ensures that all relevant events are collected centrally and can be routed to an SQS queue for further processing, adhering to AWS best practices for centralized event management across multiple accounts.

Question 3

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 MB. Which option will meet these requirements with the HIGHEST level of security? Options: 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 ID 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 Cognito identity prefix to restrict users to use their own folders in Amazon S3.
  • 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 ID 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 Cognito identity prefix to restrict users to use their own folders in Amazon S3. Correct

Explanation

Option D is correct because using an IAM policy within the Amazon Cognito identity pool allows for fine-grained access control, ensuring that each user can only access their own folder in Amazon S3. This approach leverages AWS's security model to enforce permissions directly at the resource level, providing a high level of security and compliance with the requirement that users can only access their own files.

Question 4

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 sequence 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? Options: A. AWS Batch B. AWS Step Functions C. AWS Glue D. AWS Lambda
  • A. AWS Batch
  • B. AWS Step Functions Correct
  • C. AWS Glue
  • D. AWS Lambda

Explanation

AWS Step Functions is designed to coordinate the components of distributed applications and microservices, allowing for the creation of workflows that run business rules in sequence. It handles error management and retries, making it suitable for orchestrating data flows with minimal maintenance, which aligns with the company's requirements.

Question 5

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? Options: A. The Lambda function's concurrency limit has been exceeded. B. 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.
  • A. The Lambda function's concurrency limit has been exceeded.
  • B. DynamoDB table requires a global secondary index (GSI) to support writes.
  • C. The Lambda function does not have IAM permissions to write to DynamoDB. Correct
  • D. The DynamoDB table is not running in the same Availability Zone as the Lambda function.

Explanation

The most likely cause of the issue is that the Lambda function does not have the necessary IAM permissions to write to the DynamoDB table (Option C). According to AWS documentation, a Lambda function requires explicit permission through an IAM role attached to it in order to access other AWS services like DynamoDB.

Question 6

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? Options: 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.
  • 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. Correct

Explanation

According to AWS documentation, to restrict input values for a parameter to a specific set of options, you can use the 'AllowedValues' property within the parameter definition in a CloudFormation template. This allows specifying a list of approved EC2 instance types from which users can choose.

Question 7

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? (Choose two.) Options: 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.
  • A. Retry the batch operation immediately.
  • B. Retry the batch operation with exponential backoff and randomized delay. Correct
  • 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. Correct
  • E. Increase the provisioned write capacity of the DynamoDB tables that the operation accesses.

Explanation

According to AWS documentation, when UnprocessedKeys are returned in a BatchGetItem response, it indicates that some items could not be processed due to insufficient read capacity. To increase resiliency, the developer should retry the batch operation with exponential backoff and randomized delay (B) to avoid overwhelming DynamoDB, and also consider increasing the provisioned read capacity of the DynamoDB tables (D) to handle the request load effectively.

Question 8

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? Options: 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.
  • 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. Correct
  • 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.

Explanation

The correct answer is B because installing and running the X-Ray daemon on the on-premises servers allows for the least amount of configuration to enable X-Ray tracing. The X-Ray daemon automatically captures segment data from the application and relays it to the X-Ray service, simplifying the setup process compared to other methods.

Question 9

A company wants to share information with a third party. The third party has an HTTP API endpoint that the company can use to share the information. The company has the required API key to access the HTTP API. The company needs a way to manage the API key by using code. The integration of the API key with the application code cannot affect application performance. Which solution will meet these requirements MOST securely? Options: A. Store the API credentials in AWS Secrets Manager. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call. B. Store the API credentials in a local code variable. Push the code to a secure Git repository. Use the local code variable at runtime to make the API call. C. Store the API credentials as an object in a private Amazon S3 bucket. Restrict access to the S3 object by using IAM policies. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call. D. Store the API credentials in an Amazon DynamoDB table. Restrict access to the table by using resource-based policies. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call.
  • A. Store the API credentials in AWS Secrets Manager. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call. Correct
  • B. Store the API credentials in a local code variable. Push the code to a secure Git repository. Use the local code variable at runtime to make the API call.
  • C. Store the API credentials as an object in a private Amazon S3 bucket. Restrict access to the S3 object by using IAM policies. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call.
  • D. Store the API credentials in an Amazon DynamoDB table. Restrict access to the table by using resource-based policies. Retrieve the API credentials at runtime by using the AWS SDK. Use the credentials to make the API call.

Explanation

Option A is correct because storing the API key in AWS Secrets Manager allows for secure and dynamic retrieval of secrets without hardcoding them into application code, thus not affecting performance. Secrets Manager provides a secure way to manage secrets such as API keys, ensuring they are accessed securely at runtime.

Question 10

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? Options: 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.
  • 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. Correct
  • 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.

Explanation

Option A is correct because AWS Systems Manager Parameter Store allows secure storage and retrieval of different types of variables, including credentials which can be further secured using AWS Secrets Manager. This approach requires minimal application changes and supports environment-specific variable management without hardcoding sensitive information.

Question 11

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? Options: 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).
  • 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. Correct
  • 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).

Explanation

Option B is correct because it leverages Amazon DynamoDB for storing structured data such as employee contact details, which provides fast and predictable performance. Additionally, using Amazon S3 to store high-resolution photos ensures scalability, durability, and efficient retrieval of binary objects via AWS APIs.

Question 12

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? Options: 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 photos by querying DynamoDB for the S3 key. D. Create a users table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the users 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 par of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.
  • 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. Correct
  • 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 photos by querying DynamoDB for the S3 key.
  • D. Create a users table in DynamoDB. Use the table to manage user accounts. Create a Lambda authorizer that validates user credentials against the users 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 par of the photo details in the DynamoDB table. Retrieve previously uploaded photos by querying DynamoDB for the S3 key.

Explanation

Option B is correct because it uses Amazon Cognito user pools to manage user accounts and authorizes access through API Gateway, which reduces operational overhead compared to managing IAM users or custom DynamoDB tables. Storing photos in Amazon S3 is more efficient for handling the range of photo sizes (300 KB to 5 MB) than storing them directly in DynamoDB.

Question 13

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? Options: 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.
  • 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. Correct
  • D. Create one Amazon Simple Notification Service (Amazon SNS) topic. Subscribe all partners to the SNS topic.

Explanation

Option C is correct because it allows for scalability and minimal code changes when adding new partners. By using a single SNS topic with filter policies, each partner can subscribe to receive only messages relevant to their orders without requiring separate Lambda functions or topics per partner.

Question 14

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? Options: 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.
  • 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. Correct
  • 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.

Explanation

The correct answer is C because using an S3 Object Lambda access point allows for dynamic processing of objects on retrieval, where the removePii function can be invoked to redact PII from the document before returning it to third-party organizations. This approach ensures that only one copy of the original immutable record is stored in Amazon S3 while meeting regulatory requirements.

Question 15

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? Options: 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.
  • A. Use AWS OpsWorks to perform blue/green deployments.
  • B. Use a function alias with different versions. Correct
  • C. Maintain deployment packages for older versions in Amazon S3.
  • D. Use AWS CodePipeline for deployments and rollbacks.

Explanation

Using a function alias with different versions (Option B) allows the developer to quickly switch between Lambda function versions with minimal operational overhead, as it leverages native AWS Lambda features designed specifically for version control and management.

Question 16

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? Options: 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.
  • A. Increase the function's CPU core count.
  • B. Increase the function's memory. Correct
  • C. Increase the function's reserved concurrency.
  • D. Increase the function's timeout.

Explanation

According to AWS documentation, for CPU-bound Lambda functions, increasing the amount of memory allocated to the function also increases its CPU power proportionally. This allows the function to process tasks faster and return responses more quickly.

Question 17

For a deployment using AWS Code Deploy, what is the run order of the hooks for in-place deployments? Options: A. BeforeInstall -> ApplicationStop -> ApplicationStart -> AfterInstall B. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart C. BeforeInstall -> ApplicationStop -> ValidateService -> ApplicationStart D. ApplicationStop -> BeforeInstall -> ValidateService -> ApplicationStart
  • A. BeforeInstall -> ApplicationStop -> ApplicationStart -> AfterInstall
  • B. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart Correct
  • C. BeforeInstall -> ApplicationStop -> ValidateService -> ApplicationStart
  • D. ApplicationStop -> BeforeInstall -> ValidateService -> ApplicationStart

Explanation

According to AWS documentation, for in-place deployments using AWS CodeDeploy, the correct run order of deployment hooks is ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart.

Question 18

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? Options: 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.
  • 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. Correct
  • 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.

Explanation

Option B is correct because it involves publishing custom metrics to CloudWatch that record failures of the external payment processing API calls, and configuring a CloudWatch alarm to notify the existing SNS topic when the error rate exceeds 5% within an hour. This approach directly monitors the required metric and triggers notifications based on the defined threshold.

Question 19

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? Options: 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.
  • A. Enable API caching in API Gateway. Correct
  • 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.

Explanation

Enabling API caching in API Gateway can help enhance the responsiveness of the APIs by storing responses to unauthenticated read requests, thereby reducing the need to invoke AWS Lambda functions repeatedly for the same data that is updated daily. This reduces latency and improves performance.

Question 20

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? Options: 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.
  • 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. Correct
  • 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.

Explanation

Option A correctly configures an Amazon DynamoDB table with a composite primary key (title as partition key and release year as sort key) to support efficient retrieval of movie details by title and release year. Additionally, it creates a global secondary index with genre as the partition key and title as the sort key, enabling efficient queries for all movies within a specific genre.

Verifying access...