A company is releasing a new feature. Users can request early access to the new feature by using an application form. The company expects a surge of requests when the application form becomes available. Each request will be stored as an item in an Amazon DynamoDB table.
Each item will contain the user's username, the submission date, and a validation status of UNVALIDATED. VALID, or NOT VALID. Each item also will contain the user's rating of the process on a scale of 1 to 5.
Each user can submit one request. For the DynamoDB table, the developer must choose a partition key that will give the workload well-distributed records across partitions.
Which DynamoDB attribute will meet these requirements?
A. Username
B. Submission date
C. Validation status
D. Rating of the process on a scale of 1 to 5
Show Answer
Correct Answer: A
Explanation: The partition key should have high cardinality and distribute writes evenly across partitions. Username is unique because each user can submit only one request, providing good key distribution during the expected surge. Submission date can concentrate many writes into the same key if many requests arrive at the same time, while validation status has only three values and rating only five values, both causing hot partitions.
Question 233
A company needs to deploy all its cloud resources by using AWS CloudFormation templates. A developer must create an Amazon Simple Notification Service (Amazon SNS) automatic notification to help enforce this rule. The developer creates an SNS topic and subscribes the email address of the company's security team to the SNS topic.
The security team must receive a notification immediately if an IAM role is created without the use of CloudFormation.
Which solution will meet this requirement?
A. Create an AWS Lambda function to filter events from CloudTrail if a role was created without CloudFormation. Configure the Lambda function to publish to the SNS topic. Create an Amazon EventBridge schedule to invoke the Lambda function every 15 minutes.
B. Create an AWS Fargate task in Amazon Elastic Container Service (Amazon ECS) to filter events from CloudTrail if a role was created without CloudFormation. Configure the Fargate task to publish to the SNS topic. Create an Amazon EventBridge schedule to run the Fargate task every 15 minutes.
C. Launch an Amazon EC2 instance that includes a script to filter events from CloudTrail if a role was created without CloudFormation. Configure the script to publish to the SNS topic. Create a cron job to run the script on tile EC2 instance every 15 minutes.
D. Create an Amazon EventBridge rule to filter events from CloudTrail if a role was created without CloudFormation. Specify the SNS topic as the target of the EventBridge rule.
Show Answer
Correct Answer: D
Explanation: Use an Amazon EventBridge rule that matches CloudTrail management events for IAM CreateRole and filters out roles created by AWS CloudFormation (for example, based on the event's user identity or invocation context). Configure the SNS topic as the rule target. This provides event-driven, near-immediate notification without polling. The other options rely on scheduled execution every 15 minutes, which does not satisfy the requirement for immediate notification.
Question 234
A developer uses AWS CloudFormation to deploy an Amazon API Gateway API and an AWS Step Functions state machine. The state machine must reference the API Gateway API after the CloudFormation template is deployed. The developer needs a solution that uses the state machine to reference the API Gateway endpoint.
Which solution will meet these requirements MOST cost-effectively?
A. Configure the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property for the AWS::StepFunctions::StateMachine resource.
B. Configure the CloudFormation template to store the API endpoint in an environment variable for the AWS::StepFunctions::StateMachine resource. Configure the state machine to reference the environment variable.
C. Configure the CloudFormation template to store the API endpoint in a standard AWS::SecretsManager::Secret resource. Configure the state machine to reference the resource.
D. Configure the CloudFormation template to store the API endpoint in a standard AWS::AppConfig::ConfigurationProfile resource. Configure the state machine to reference the resource.
Show Answer
Correct Answer: A
Explanation: AWS CloudFormation supports the DefinitionSubstitutions property on the AWS::StepFunctions::StateMachine resource to inject dynamic values, such as an API Gateway endpoint, into the Amazon States Language definition at deployment time. This avoids hardcoding values and does not require additional services or ongoing costs. Step Functions does not support environment variables for state machines, making option B invalid. Secrets Manager and AppConfig are unnecessary and add cost for a static deployment-time endpoint reference.
Question 235
A company is building a serverless application on AWS. The application uses Amazon API Gateway and AWS Lambda. The company wants to deploy the application to its development, test, and production environments.
Which solution will meet these requirements with the LEAST development effort?
A. Use API Gateway stage variables and create Lambda aliases to reference environment-specific resources.
B. Use Amazon Elastic Container Service (Amazon ECS) to deploy the application to the environments.
C. Duplicate the code for each environment. Deploy the code to a separate API Gateway stage.
D. Use AWS Elastic Beanstalk to deploy the application to the environments.
Show Answer
Correct Answer: A
Explanation: API Gateway stage variables combined with Lambda aliases are the standard serverless approach for managing development, test, and production environments with minimal development effort. Stage variables allow environment-specific configuration, while Lambda aliases point each stage to the appropriate published Lambda version. ECS and Elastic Beanstalk are not appropriate for this API Gateway + Lambda serverless architecture, and duplicating code across environments increases maintenance effort.
Question 236
A company runs an application on AWS. The application consists of a static website that is hosted on Amazon S3. The application includes Amazon API Gateway APIs that invoke AWS Lambda functions. During a period of high traffic on the application, application users reported that the application was slow at irregular intervals. There were no failed requests.
A developer needs to find the slow executions across all the Lambda functions.
Which solution will meet these requirements?
A. Perform a query across all the Lambda function log groups by using Amazon CloudWatch Logs Insights. Filter on type of report and sort descending by Lambda function execution duration.
B. Enable AWS CloudTrail Insights on the account where the Lambda functions are running. After CloudTrail Insights has finished processing, review CloudTrail Insights to find the anomalous functions.
C. Enable AWS X-Ray for all the Lambda functions. Configure an X-Ray insight on a new group that includes all the Lambda functions. After the X-Ray insight has finished processing, review the X-Ray logs.
D. Set up AWS Glue to crawl through the logs in Amazon CloudWatch Logs for the Lambda functions. Configure an AWS Glue job to transform the logs into a structured format and to output the logs into Amazon S3. Use the Amazon CloudWatch dashboard to visualize the slowest functions based on the duration.
Show Answer
Correct Answer: A
Explanation: CloudWatch Logs Insights can query across multiple Lambda log groups and analyze existing REPORT log entries, which include Duration. Filtering for REPORT records and sorting by duration directly identifies the slowest Lambda executions across all functions. CloudTrail Insights detects API activity anomalies, not Lambda execution latency. X-Ray must be enabled before tracing and is not suitable for analyzing past executions if it was not already enabled. AWS Glue is unnecessarily complex for this task.
Question 237
A developer is building a serverless application on AWS for a workflow that processes high volumes of data. In the workflow, an AWS Step Functions state machine invokes several AWS Lambda functions.
One of the Lambda functions occasionally fails because of timeout errors during periods of high demand. The developer must ensure that the workflow automatically retries the failed function invocation if a timeout error occurs.
Which solution will meet this requirement?
A. Add a Retry field in the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts and the timeout error type to retry on.
B. Add a Timeout field in the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts.
C. Add a Fail state to the Step Functions state machine definition. Configure the state machine with the maximum number of retry attempts.
D. Update the Step Functions state machine to pass the invocation request to an Amazon Simple Notification Service (Amazon SNS) topic. Subscribe a Lambda function to the SNS topic. Configure the Lambda function with the maximum number of retry attempts for a timeout error type.
Show Answer
Correct Answer: A
Explanation: AWS Step Functions supports built-in error handling for Task states through the Retry field. You can configure retries for specific error types such as States.Timeout, along with MaxAttempts, IntervalSeconds, and BackoffRate. Timeout is not used to configure retries, a Fail state does not retry execution, and introducing SNS is unnecessary because Step Functions already provides native retry behavior.
Question 238
A developer needs approval from a product owner before the developer can deploy code for an application to production. The developer uses AWS CodePipeline to deploy the application. The developer configures an Amazon Simple Notification Service (Amazon SNS) topic to send notifications to the product owner.
Which solution is the MOST operationally efficient way for the developer to receive approval from the product owner?
A. Add a new stage to CodePipeline before the production deployment. Add a manual approval action to the new stage. Add a new notification rule in the pipeline settings. Specify manual approval as the event that initiates the notification. Specify the SNS topic's Amazon Resource Name (ARN) to notify the product owner.
B. Develop an AWS Step Functions state machine that sends a notification to the product owner and accepts an approval. Add a new stage to CodePipeline before the production deployment. Add the state machine as a Step Functions action to the new stage.
C. Add a manual approval action to the existing production deployment stage in CodePipeline. Specify the SNS topic's Amazon Resource Name (ARN) while configuring the new manual approval action.
D. Edit the settings in CodePipeline. Create a new notification rule. Specify manual approval as the event that initiates the notification. Create a new notification target. Specify the SNS topic to notify the product owner. Save the notification rule.
Show Answer
Correct Answer: A
Explanation: The most operationally efficient approach is to use CodePipeline's built-in manual approval action in a separate stage immediately before the production deployment. Configure the manual approval action with the Amazon SNS topic so the product owner is notified when approval is required. A dedicated approval stage cleanly gates production deployment. Step Functions is unnecessary overhead, option C places the approval within the production stage rather than as a distinct pre-deployment gate, and notification rules alone do not implement the approval action.
Question 239
A company introduced a new feature that should be accessible to only a specific group of premium customers. A developer needs the ability to turn the feature on and off in response to performance and feedback. The developer needs a solution to validate and deploy these configurations quickly without causing any disruptions.
What should the developer do to meet these requirements?
A. Use AWS AppConfig to manage the feature configuration and to validate and deploy changes. Use feature flags to turn the feature on and off.
B. Use AWS Secrets Manager to securely manage and validate the feature configurations. Enable lifecycle rules to turn the feature on and off.
C. Use AWS Config to manage the feature configuration and validation. Set up AWS Config rules to turn the feature on and off based on predefined conditions.
D. Use AWS Systems Manager Parameter Store to store and validate the configuration settings for the feature. Enable lifecycle rules to turn the feature on and off.
Show Answer
Correct Answer: A
Explanation: AWS AppConfig is purpose-built for application configuration management, including feature flags. It supports validators, controlled deployments, monitoring, and rapid rollback, allowing developers to safely enable or disable features for targeted customer groups without redeploying code. The other services are not designed for feature flag management: Secrets Manager stores secrets, AWS Config evaluates AWS resource compliance, and Parameter Store stores configuration values but does not provide AppConfig's feature flag and safe deployment capabilities.
Question 240
A company has an analytics application that uses an AWS Lambda function to process transaction data asynchronously. A developer notices that asynchronous invocations of the Lambda function sometimes fail. When failed Lambda function invocations occur, the developer wants to invoke a second Lambda function to handle errors and log details.
Which solution will meet these requirements?
A. Configure a Lambda function destination with a failure condition. Specify Lambda function as the destination type. Specify the error-handling Lambda function's Amazon Resource Name (ARN) as the resource.
B. Enable AWS X-Ray active tracing on the initial Lambda function. Configure X-Ray to capture stack traces of the failed invocations. Invoke the error-handling Lambda function by including the stack traces in the event object.
C. Configure a Lambda function trigger with a failure condition. Specify Lambda function as the destination type. Specify the error-handling Lambda function's Amazon Resource Name (ARN) as the resource.
D. Create a status check alarm on the initial Lambda function. Configure the alarm to invoke the error-handling Lambda function when the alarm is initiated. Ensure that the alarm passes the stack trace in the event object.
Show Answer
Correct Answer: A
Explanation: For asynchronous Lambda invocations, AWS Lambda supports asynchronous invocation destinations. You can configure an on-failure destination that sends the invocation record to another Lambda function, Amazon SQS, Amazon SNS, Amazon EventBridge, or another supported target. Configuring a Lambda destination with a failure condition to invoke the error-handling Lambda function directly satisfies the requirement. X-Ray does not invoke functions on failures, Lambda triggers are event sources rather than failure handlers, and CloudWatch alarms do not pass invocation stack traces to another Lambda function.
Question 241
A company has on-premises data centers that run an image processing service. The service consists of containerized applications that run on Kubernetes clusters. All the applications have access to the same NFS share for files and data storage.
The company is running out of NFS capacity in the data centers and needs to migrate to AWS as soon as possible. The Kubernetes clusters must be highly available on AWS.
Which combination of actions will meet these requirements? (Choose two.)
A. Transfer the information that is in the NFS share to an Amazon Elastic Block Store (Amazon EBS) volume. Upload the container images to Amazon Elastic Container Registry (Amazon ECR).
B. Transfer the information that is in the NFS share to an Amazon Elastic File System (Amazon EFS) volume. Upload the container images to Amazon Elastic Container Registry (Amazon ECR).
C. Create an Amazon Elastic Container Service (Amazon ECS) cluster to run the applications. Configure each node of the cluster to mount the Amazon Elastic Block Store (Amazon EBS) volume at the required path for the container images.
D. Create an Amazon Elastic Kubernetes Service (Amazon EKS) cluster to run the applications. Configure each node of the cluster to mount the Amazon Elastic Block Store (Amazon EBS) volume at the required path for the container images.
E. Create an Amazon Elastic Kubernetes Service (Amazon EKS) cluster to run the applications. Configure each node of the cluster to mount the Amazon Elastic File System (Amazon EFS) volume at the required path for the container images.
Show Answer
Correct Answer: B, E
Explanation: The workload already runs on Kubernetes, so Amazon EKS is the managed Kubernetes service that preserves the existing orchestration model and supports high availability across Availability Zones. The existing shared NFS storage requirement maps directly to Amazon EFS, which provides a managed, multi-AZ NFS file system that can be mounted by multiple Kubernetes nodes and pods. Amazon ECR is the appropriate registry for container images. Amazon EBS is block storage attached to individual instances and is not a replacement for a shared NFS file system across a Kubernetes cluster.
$19
Get all 553 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.