All practice questions
1542 questions
A developer is designing a REST API in Amazon API Gateway to serve as a backend for a mobile application. The API must validate user identity tokens issued by Amazon Cognito User Pools. Once authenticated, the requests must be routed to an AWS Lambda function. To minimize custom code maintenance, execution overhead, and configuration complexity, the developer wants to avoid writing custom request mapping templates or token validation code in API Gateway. Which TWO actions should the developer take to meet these requirements?
Select all that apply
A developer is building a serverless integration where an AWS Lambda function with a timeout of seconds processes messages from an Amazon SQS FIFO queue containing inventory updates. The system must guarantee that updates for the same product are processed in the order they are received, and messages should not be processed multiple times due to timeout discrepancies.
Which of the following configurations should the developer implement to meet these requirements? (Select TWO.)
Select all that apply
A developer is designing an integration for an IoT system that logs temperature metrics to an Amazon DynamoDB table. The table uses `SensorId` as the partition key and `Timestamp` as the sort key. A Lambda function executes a `Query` operation to retrieve metrics for a specific `SensorId` over a 24-hour period.
The query matches exactly 100 items, and each item has an average size of . The operation uses a `FilterExpression` to only return the 20 items where the `AlertStatus` attribute is set to `RED`. Additionally, a `ProjectionExpression` is used to limit the returned attributes to `Timestamp` and `Reading`, reducing the payload size of each returned item to .
If the query is configured to use strongly consistent reads and the Lambda function must handle 10 queries per second, what is the minimum read capacity units (RCUs) that must be provisioned for the table to prevent throttling?
A developer has deployed an AWS Lambda function inside a private subnet of a VPC to process data and write it to an Amazon RDS database. The function also needs to call a third-party payment processing API over HTTPS and upload a summary report to Amazon S3. During testing, the developer observes that the Lambda function can write to the RDS database, but attempts to connect to the third-party API and Amazon S3 fail with network timeouts. Additionally, the Lambda function's execution duration is high due to establishing new HTTPS connections on every execution.
Which two actions should the developer take to resolve these network timeouts and optimize connection performance?
Select all that apply
A ride-sharing booking application named 'CabFlow' processes ride requests using an Amazon DynamoDB table. During a major city-wide holiday event, the application experiences a massive surge in booking requests, resulting in `ProvisionedThroughputExceededException` errors. Monitoring indicates that the write requests are heavily concentrated on a partition key representing the current hour and city (e.g., `20260715-NYC`), creating a hot partition, while the table's overall provisioned capacity is not fully utilized. Which of the following actions should the developer take to resolve this key distribution and throttling issue? (Select TWO options.)
Select all that apply
A developer is building a web-based reporting dashboard for an enterprise sales team. Users of the dashboard must authenticate using their email and password. Once authenticated, the client application needs to perform two actions: call a secure REST API hosted on Amazon API Gateway to fetch sales metadata, and download raw report files directly from a private Amazon S3 bucket. The developer wants to use Amazon Cognito to implement the authentication and authorization flows. Which TWO configuration steps should the developer perform to meet these requirements with the least administrative and operational overhead? (Select TWO.)
Select all that apply
An organization is designing a microservice that will run on AWS Lambda within a private subnet to process messages. The microservice uses the AWS SDK to retrieve sensitive configuration data. During local testing on developer workstations, the application needs to use credentials from a local AWS CLI profile named `dev-profile`. When running on AWS, the microservice must run securely with minimal privilege and without hardcoded secrets.
Which two configuration steps should the developer perform to satisfy these requirements? (Select TWO.)
Select all that apply
A developer is designing a corporate desk-booking application. The DynamoDB table uses `DeskId` as the partition key and `BookingDate#Slot` (e.g., `2026-08-01#Morning`) as the sort key. The application must support two new access patterns:
1. Retrieve all bookings for a specific employee (`EmployeeId`) sorted by date.
2. Retrieve only the bookings that are currently marked as "PendingApproval" (representing less than of all bookings) to run a daily cleanup cron job.
Which two options should the developer implement to satisfy these requirements with the lowest consumption of Read Capacity Units (RCUs)?
Select all that apply
A developer is configuring an AWS Lambda function that processes user session data. The function needs to connect to an Amazon ElastiCache for Redis cluster running in private subnets within a VPC. Additionally, the function must retrieve an API key stored in AWS Secrets Manager to authenticate calls to an external third-party service. The developer deploys the Lambda function inside the same private subnets of the VPC to ensure connectivity to the Redis cluster. However, during testing, the function fails to connect to AWS Secrets Manager and timeouts when attempting to invoke the external third-party API. Which two actions should the developer take to resolve these connectivity issues? (Select two.)
Select all that apply
A developer is setting up an Amazon EventBridge rule to route custom application events to an Amazon Kinesis Data Stream target for real-time analytics. The stream consists of 12 shards. The incoming events contain a JSON payload with fields including `transaction_id` (a high-entropy UUID), `region` (one of 4 geographic regions), and `department` (one of 3 departments). The developer needs to ensure that the events are distributed evenly across all shards to prevent throttling, and that EventBridge has the necessary permissions to write to the Kinesis stream. Which configuration meets these requirements?
A developer is building a home automation backend where smart home hubs publish state-change events to a custom Amazon EventBridge event bus. The developer wants to route these events to an Amazon Kinesis Data Stream for real-time anomaly detection. It is critical that events originating from the same home hub are processed in the exact order they are generated to avoid false alarm triggers. During testing, the Kinesis Data Stream suffers from write throttling due to a hot shard, while other shards remain underutilized. Which target configuration change in the EventBridge rule will resolve the throttling while preserving the ordered processing of events from each hub?
A developer is building a document conversion service where users upload files to be converted. The architecture uses an Amazon SQS queue to hold conversion tasks. A fleet of consumer instances running on Amazon ECS retrieves messages from the queue, processes the conversion (which takes up to 5 minutes per document), and then deletes the messages. During peak traffic, the developer notices that some documents are being processed multiple times by different container instances. Which two actions should the developer take to resolve this issue? (Select TWO)
Select all that apply
A developer is implementing an IoT smart-home integration system. Devices publish telemetry and alert events to an Amazon SNS topic. These events must be fanout-routed to separate Amazon SQS queues: one for immediate alarm processing by an AWS Lambda function, and one for daily status archiving. The alarm events require up to seconds of processing time by the Lambda function, but alarms are currently being processed multiple times by the function. Which actions must the developer take to configure the message routing and prevent duplicate processing of the alarm messages? (Select TWO.)
Select all that apply
A developer is designing a document management system where metadata is stored in an Amazon DynamoDB table with DocumentId as the partition key. The application must support two new requirements:
1. Retrieve all documents associated with a specific Department (e.g., 'HR') that were uploaded after a certain timestamp.
2. Retrieve a list of all documents that are flagged as containing malware (the IsMalicious attribute is set to true), which applies to less than 0.1% of all stored documents.
To optimize queries and minimize Read Capacity Units (RCUs) consumption, which two actions should the developer take? (Select TWO.)
Select all that apply
A developer is developing a serverless application that uses an AWS Lambda function to write logs and user status updates to an Amazon RDS PostgreSQL database instance. During high-concurrency load testing, the database starts throwing connection limit exhaustion errors. Additionally, the developer notices that each invocation suffers from high latency because a new database connection is created every time. Which TWO actions should the developer take to resolve the database connection limit errors and improve connection latency? (Select TWO.)
Select all that apply
A developer is optimizing a multiplayer gaming application backend. The application tracks player performance in real time and stores match results in an Amazon DynamoDB table. The table has `MatchId` as the partition key and `PlayerId` as the sort key. Each item contains additional attributes such as `Score`, `Duration`, and `Region`. For a post-match leaderboard display, the application needs to retrieve only the players who scored more than points in a specific match. The target match contains approximately player records, but typically fewer than players achieve a score above . Which approach will retrieve this data with the lowest latency and minimum Read Capacity Unit (RCU) consumption?
A software team is transitioning an Amazon API Gateway REST API endpoint from a Lambda custom integration to a Lambda proxy integration to reduce configuration overhead. Currently, the backend AWS Lambda function receives a pre-mapped JSON payload containing only application data, and it returns a custom business object directly. What modification must be made to the Lambda function code to ensure the API endpoint continues to function correctly under the new integration?
An application uses an Amazon SQS queue to receive transaction records. A developer is designing an AWS Lambda function to process these transactions. The Lambda function should only be invoked for messages where the `transactionType` is `refund` and the `amount` is greater than . The developer wants to minimize Lambda invocation costs. Which of the following steps should the developer take to meet these requirements? (Select two.)
Select all that apply
A developer is configuring an AWS CloudFormation template to deploy an application that requires a database password. The password must be stored securely and rotated automatically every 30 days. Additionally, the developer must ensure that if a stack update fails, the resources are reverted to their previous working state. Which CloudFormation configurations and features should the developer use to meet these requirements? (Select TWO.)
Select all that apply
A developer is configuring a basic continuous delivery pipeline in AWS CodePipeline to automate software releases. The pipeline must retrieve source code from an AWS CodeCommit repository, compile the project using AWS CodeBuild, and deploy it to an Amazon ECS service using AWS CodeDeploy. Arrange the following steps in the correct chronological order from first to last to complete a single pipeline execution.
Drag items to arrange them in the correct order