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: A good DynamoDB partition key should have high cardinality to distribute items evenly across partitions and avoid hot keys. Username is unique per user (each user submits only one request), so it provides excellent distribution. Submission date can cause hot partitions during a surge, and validation status or rating have very low cardinality, which would concentrate writes into a few 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: CloudTrail records IAM CreateRole API calls in near real time. An Amazon EventBridge rule can directly match CloudTrail management events where an IAM role is created and exclude those initiated by CloudFormation (for example, by checking the eventSource and userAgent or invokedBy fields). EventBridge can immediately route matching events to an SNS topic without polling or scheduled jobs, meeting the requirement for immediate notification with minimal infrastructure.
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: The most cost-effective solution is to use CloudFormation’s native DefinitionSubstitutions property for the AWS::StepFunctions::StateMachine resource. This allows the API Gateway endpoint, which is known only after deployment, to be dynamically injected into the state machine definition at deploy time without additional services or runtime lookups. Options B, C, and D either are not supported for Step Functions (environment variables) or introduce extra managed services (Secrets Manager or AppConfig), which add unnecessary cost and complexity.
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: Using API Gateway stage variables together with Lambda aliases allows the same codebase to be deployed across development, test, and production with minimal effort. Stage variables handle environment-specific configuration, while Lambda aliases point each stage to the appropriate function version. This avoids code duplication and additional infrastructure, making it the least development effort solution for a serverless architecture.
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 the existing Lambda log groups and analyze past executions. By filtering on REPORT log entries and sorting by execution duration, a developer can identify the slowest Lambda executions across all functions during the high-traffic period. AWS X-Ray requires tracing to be enabled beforehand and would not retroactively analyze past executions, making it less suitable here.
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 natively supports automatic retries for Task states, including Lambda invocations. By adding a Retry field to the state machine definition, the developer can specify the error type (such as States.Timeout), maximum retry attempts, and backoff behavior. This directly ensures the workflow retries the Lambda function when a timeout occurs without adding extra services.
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: AWS CodePipeline natively supports manual approval actions, which are designed for exactly this use case. Adding a dedicated approval stage before production allows the pipeline to pause until the product owner approves, and integrating Amazon SNS through a notification rule automatically notifies the approver. This approach requires no custom code or additional services, making it more operationally efficient than building a Step Functions workflow or relying only on notifications without a proper approval gate.
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 designed specifically for managing application configurations and feature flags. It allows targeted feature enablement (such as for premium customers), supports validation of configuration changes, and enables safe, rapid deployment and rollback without redeploying code. This meets the need to quickly turn features on and off in response to performance and feedback with minimal disruption.
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 Destinations natively support routing invocation records to a target on success or failure. By configuring a destination for failed invocations and specifying another Lambda function as the destination, AWS automatically invokes the error-handling function whenever the original invocation fails, without custom retry logic or monitoring. The other options misuse triggers, X-Ray, or CloudWatch alarms, which are not designed to directly invoke a Lambda function on each asynchronous failure.
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 applications share a common NFS filesystem, which requires a scalable, shared, multi-AZ file system in AWS. Amazon EFS is NFS-compatible and can be mounted concurrently by multiple Kubernetes pods and nodes, unlike EBS. To keep Kubernetes and achieve high availability, the workloads should run on Amazon EKS. Therefore, migrating the NFS data to EFS and running the containers on EKS with EFS mounted meets both the storage and HA requirements.
$19
Get all 555 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.