All practice questions
1542 questions
An online learning platform stores quiz questions and metadata in an Amazon DynamoDB table. During exams, a surge in user traffic causes high read latency and ProvisionedThroughputExceededException errors when the application retrieves quiz details. The developer wants to introduce Amazon DynamoDB Accelerator (DAX) to optimize query performance with minimal latency and minimal application rewrite. The application currently retrieves quiz details using strongly consistent reads and executes frequent Scan operations to populate list views. Which combination of actions should the developer take to resolve the latency and throttling issues? (Select two.)
Select all that apply
A developer is implementing a mobile e-commerce application. The application requires a secure user sign-up and sign-in system. Once authenticated, the application must make secure REST API requests to an Amazon API Gateway backend to fetch order history. The developer wants to use a managed user directory and ensure that API Gateway automatically validates the JSON Web Tokens (JWT) sent in the request header without maintaining custom authentication code or custom backend validation logic.
Which setup meets these requirements with the lowest operational complexity?
A developer is building a serverless application where an AWS Lambda function processes messages from an Amazon SQS queue. The function is configured to connect to an Amazon RDS MySQL database located in a private VPC subnet, and it also needs to make HTTPS requests to an external payment gateway API. The Lambda function's timeout is set to 15 seconds, and the SQS queue's visibility timeout is set to 10 seconds. During testing, the developer observes that messages are frequently being processed multiple times by the function, and all outbound requests to the payment gateway API fail due to network timeouts. Which configuration changes should the developer implement to resolve these issues?
A developer is building a logistics tracking application that records real-time updates for delivery packages. The system uses an Amazon DynamoDB table where the partition key is `DeliveryDate` (formatted as `YYYY-MM-DD`) and the sort key is `TransitTimestamp#PackageId`. During peak hours, the application experiences a high volume of package status updates, resulting in frequent `ProvisionedThroughputExceededException` errors, even though the total consumed write capacity is well below the table's overall provisioned capacity. Which approach should the developer implement to resolve the write throttling issue while maintaining the ability to retrieve items by date?
A developer is building a serverless application. An AWS Lambda function is configured to run in the private subnets of a VPC to retrieve data from a private Amazon Aurora PostgreSQL DB cluster. The Lambda function also needs to call a public web service to retrieve reference data. Currently, the Lambda function can connect to the database but cannot connect to the public web service. Which two actions must the developer take to allow the function to connect to the public web service while maintaining access to the private database? (Select two.)
Select all that apply
A developer is optimizing a reporting dashboard for a logistics application. The application tracks shipment updates in an Amazon DynamoDB table with as the partition key and as the sort key. The dashboard needs to retrieve all shipments that are currently in 'Delayed' status and have a weight exceeding kg. This query must run efficiently across millions of shipments. Which two actions should the developer take to retrieve this data with the lowest latency and minimal Read Capacity Unit (RCU) consumption? (Select TWO.)
Select all that apply
A developer is implementing a serverless data import service. An AWS Lambda function is triggered by an Amazon SQS queue to process batches of user records. The Lambda function is configured with a batch size of 10, and processing a single batch takes an average of 120 seconds. The SQS queue has a default visibility timeout of 30 seconds. During testing, the developer observes that many user records are processed multiple times by parallel Lambda invocations. Which of the following changes will prevent this duplicate processing?
A developer is building a customer support ticketing portal. The application stores tickets in an Amazon DynamoDB table with `CustomerID` as the partition key and `TicketID` as the sort key. The developer needs to implement a dashboard view that displays all tickets with a status of `Open` across all customers, sorted by the date they were created. Which strategy should the developer use to retrieve this data with the lowest latency and minimal Read Capacity Unit (RCU) consumption?
A developer is designing a smart utility monitoring application that stores hourly meter readings in an Amazon DynamoDB table. The base table uses `DeviceID` as the partition key and `ReadingTimestamp` as the sort key. The application must support two new requirements:
1. Retrieve all readings across all devices for a specific day, sorted by energy consumption in descending order.
2. Retrieve all error events for a specific `DeviceID`, sorted by the event's timestamp.
Which two configurations should the developer implement to meet these requirements with optimal query performance and security? (Select TWO.)
Select all that apply
A logistics company operates a fleet of delivery trucks. Each truck publishes GPS telemetry events as JSON payloads to a custom Amazon EventBridge event bus. A developer is configuring an EventBridge rule to route these events directly to an Amazon Kinesis Data Stream for real-time tracking. A downstream AWS Lambda function is configured as the consumer of the Kinesis Data Stream. The developer wants to ensure that telemetry events from the same truck are routed to the same Kinesis shard to maintain order, and that the EventBridge rule has the necessary permissions to publish to the stream. Which two configurations must the developer perform to meet these requirements?
Select all that apply
A developer is configuring an AWS Lambda function to process customer registration events. The function must query an Amazon RDS MySQL database located in private VPC subnets. The database credentials are securely stored in AWS Secrets Manager. The developer wants to ensure the Lambda function can securely access the secret and connect to the database efficiently without causing database connection exhaustion or network timeouts. Which of the following configurations should the developer implement to meet these requirements? (Select TWO.)
Select all that apply
A developer is implementing an AWS Lambda function that retrieves user profile records from a MongoDB database hosted on an Amazon EC2 instance in a private VPC subnet. After processing the records, the Lambda function publishes notifications to an Amazon SNS topic. The Lambda function is configured to access resources inside the same private VPC subnet.
During integration testing, the developer identifies two issues:
1. The Lambda function times out with network errors when attempting to publish messages to the public Amazon SNS endpoint.
2. The function experiences significant latency because it initiates a new database connection for every incoming request.
Which two configuration changes or development practices should the developer implement to resolve these issues? (Select two.)
Select all that apply
A retail company's developer is designing a real-time inventory tracking system. Point of Sale (POS) terminals publish checkout events as JSON payloads containing a store_id attribute to a custom Amazon EventBridge event bus. The developer wants to route these events directly to an Amazon Kinesis Data Stream for stream processing. To ensure accurate inventory aggregation, all events originating from the same store must be processed in the exact chronological order in which they were generated. Which configuration should the developer apply to satisfy these requirements?
A developer is configuring a new API endpoint using Amazon API Gateway that integrates with a backend AWS Lambda function using a Lambda proxy integration. Which two requirements must be met to ensure that client requests are correctly processed and the API returns valid responses? (Select TWO.)
Select all that apply
A developer is configuring an Amazon API Gateway REST API that integrates with an AWS Lambda function. To support multiple environments, the developer wants to use API Gateway stage variables to dynamically route requests to the correct Lambda function alias (such as dev or prod) corresponding to the deployed stage. Which two steps must the developer perform to configure this routing and ensure successful invocations?
Select all that apply
A developer is maintaining a digital library catalog system that retrieves book details from an Amazon DynamoDB table using GetItem operations. To reduce read latency and minimize Read Capacity Units (RCUs) consumption during peak hours, the developer deploys an Amazon DynamoDB Accelerator (DAX) cluster. The application code is updated to initialize the DAX SDK client and point to the DAX cluster endpoint. However, monitoring shows that read latency remains unchanged and the DynamoDB table continues to consume RCUs at the same rate. The developer verifies that the read requests are configured as strongly consistent reads.
What should the developer do to resolve this issue and achieve the desired caching benefits?
A developer is writing a Node.js ingestion service that runs on AWS Fargate to receive telemetry events from IoT devices and write them to an Amazon SQS standard queue. Currently, the service invokes the SendMessage API for each event immediately. During peak hours, the service experiences high latency and increased costs due to the volume of API calls. The developer wants to optimize the application to minimize both API costs and network overhead when publishing messages. How should the developer configure the SDK client or application logic to achieve this?
A developer is managing a production database infrastructure stack using AWS CloudFormation. The template defines an Amazon RDS DB instance whose master password must be rotated automatically every 15 days. Additionally, a manual modification to the DB instance's security group settings made via the AWS Console has caused a subsequent CloudFormation stack update to fail, leaving the stack stuck in the UPDATE_ROLLBACK_FAILED state.
How should the developer securely reference the rotated password in the template and resolve the stack update failure?
A developer is designing a vehicle tracking system where telemetry data is written to an Amazon DynamoDB table. Each item contains VehicleID (partition key), Timestamp (sort key), Speed, FuelLevel, and GeoLocation. The application needs to retrieve telemetry records for a specific vehicle within a specific -hour window where the vehicle's speed exceeds , while minimizing read latency and resource consumption. Which two actions should the developer take to achieve this?
Select all that apply
A developer is configuring a release pipeline in AWS CodePipeline. The pipeline contains a stage that must invoke an AWS Lambda function to perform deployment validation tests. The developer creates a new IAM role for the pipeline to interact with AWS resources. During the first execution of the pipeline, the run fails at the Lambda stage with an access denied error. The developer verifies that the IAM policy attached to the pipeline's service role explicitly grants the `lambda:InvokeFunction` permission. Which of the following configuration failures is preventing the pipeline from executing the Lambda function?