Tüm alıştırma soruları
1542 soru
A smart grid monitoring application named VoltGuard collects hourly utility consumption metrics from millions of smart meters and writes the records to an Amazon DynamoDB table. The table is configured with provisioned write capacity and uses the hour of the reading (formatted as `YYYY-MM-DD-HH`) as the partition key, and the smart meter ID as the sort key. During the first few minutes of every hour, the application experiences a massive spike in write requests, leading to frequent `ProvisionedThroughputExceededException` errors, while the overall consumed capacity remains well below the table's total provisioned limits.
What is the most effective way to resolve these write throttling errors?
A developer is building a serverless processing system where an AWS Lambda function is triggered by an Amazon SQS queue. The function is configured to run inside the private subnets of a custom VPC to write processed results to an Amazon RDS database. During execution, the Lambda function needs to retrieve database credentials from AWS Secrets Manager. During initial testing, the database writes are successful, but the function fails to retrieve the credentials from AWS Secrets Manager, resulting in connection timeout errors. In addition, the developer notices that some SQS messages are being processed multiple times. Which two actions should the developer take to resolve these issues?
Geçerli olan tümünü seçin
A financial transaction processor uses an AWS Lambda function to validate account balances against an Amazon DynamoDB table. The Lambda function is configured to run inside a private subnet of a VPC to comply with security standards. During peak load, the system experiences a high rate of database connection timeouts and latency spikes. An analysis reveals that the Lambda function is establishing a new connection to DynamoDB during every invocation, and the outbound traffic to DynamoDB is routed via a NAT Gateway, leading to high data processing costs.
Which combination of actions will resolve the latency issues and reduce data transfer costs?
A developer is writing a Python application using the AWS SDK for Python (Boto3) to upload files to an Amazon S3 bucket. During local development, the application must use credentials from a shared credentials file under a profile named 'local-dev'. Once deployed to an Amazon ECS task on AWS Fargate, the application must assume the ECS task role to access the S3 bucket. The developer wants to avoid making any code changes when transitioning the application from the local environment to AWS Fargate. Which configuration approach should the developer use to meet these requirements?
A developer is optimizing a serverless application where an Amazon API Gateway REST API is integrated with an AWS Lambda function. Currently, the Lambda function performs validation on the incoming JSON request body to verify the existence of mandatory fields. If the validation fails, the Lambda function returns a custom error response. To reduce Lambda invocation costs and latency, the developer wants to reject invalid requests before they reach the backend. Which solution should the developer implement to meet these requirements?
A developer is designing a high-throughput REST API using Amazon API Gateway. The API must integrate directly with an external HTTP backend via an HTTP integration. The incoming client request is a POST request with a JSON payload containing a tenantId field in the root of the document. The external HTTP backend requires the tenantId to be passed as a path parameter in the request URL (for example, /tenants/{tenantId}/events). To minimize latency and operational costs, the developer must implement this transformation without using an intermediate AWS Lambda function. Which configuration should the developer use to dynamically map the tenantId from the JSON request body to the HTTP integration request path?
A developer is building a serverless backend using Amazon API Gateway and AWS Lambda. The API Gateway REST API is configured with a Lambda custom (non-proxy) integration. When the client sends invalid input, the Lambda function throws an exception with the error message: `[ValidationFailed] User age is under the legal limit`. The developer wants API Gateway to return a `400 Bad Request` HTTP response with a custom JSON payload when this error occurs. Which configuration steps must the developer perform in API Gateway to achieve this?
A developer is building an AWS Lambda function that retrieves customer order history from an Amazon DynamoDB table. The orders are retrieved based on a specific `CustomerID` and filtered by order status. To connect to the database, the developer has hardcoded the access keys of an IAM user directly inside the Lambda function's code. During load testing, the application experiences high latency and receives `ProvisionedThroughputExceededException` errors when retrieving orders, even though the total read capacity units (RCU) of the table are not fully utilized. The logs indicate that the application is performing a sequential `Scan` operation to find the customer's records. Which two actions should the developer take to resolve these security and performance issues? (Select TWO.)
Geçerli olan tümünü seçin
A financial services company uses an Amazon SNS topic to publish transaction notifications. One of the subscribers is an Amazon SQS standard queue that triggers an AWS Lambda function to write transaction details to an Amazon DynamoDB table. The Lambda function is configured with a timeout of seconds. The event source mapping is configured with a Batch Size of messages and a Maximum Batching Window (`MaximumBatchingWindowInSeconds`) of seconds. During high-traffic periods, the DynamoDB table experiences temporary write throttling, which in turn causes the Lambda function to be throttled. The developer observes that many transactions are processed and written to the database multiple times, creating duplicate entries. The current Visibility Timeout of the SQS queue is set to seconds. Which of the following is the root cause of these duplicate entries, and what is the correct configuration to resolve the issue?
A developer is maintaining a legacy REST API in Amazon API Gateway that integrates with an AWS Lambda function using a Lambda custom (non-proxy) integration. When client input fails validation, the Lambda function throws an exception returning the string `[ValidationFailed] Input values must be alphanumeric`. Currently, the client receives a 200 OK response with the error message in the payload. The developer wants the API to return an HTTP 400 Bad Request status code and a JSON payload containing only the error message when validation fails.
Which configuration steps should the developer perform to return the correct error response to the client?
A company is building a machine-to-machine (M2M) integration that allows an on-premises backend service to programmatically upload raw telemetry data to a private Amazon API Gateway endpoint. The developer needs to secure the API Gateway endpoint using Amazon Cognito. The backend service must authenticate using its credentials, obtain an access token, and use this token to authorize its API requests.
Which solution meets these requirements with the least operational overhead?
A flight scheduling application retrieves flight status details from an Amazon DynamoDB table using the flight number as the partition key. During peak holiday seasons, a sudden surge in search requests for a small set of popular flights causes a latency spike and throws ProvisionedThroughputExceededException errors. The developer needs to optimize the application's performance, achieving sub-millisecond read latency without rewriting the database access patterns or changing the primary key design. Which of the following solutions should the developer implement?
A developer is building a high-volume clickstream analytics pipeline where web applications publish event data to Amazon Kinesis Data Streams. The stream is configured with 4 shards, but the developer notices ProvisionedThroughputExceededException errors during high traffic. Upon review, they find that the partition key is set to a constant string value 'clickstream_event'. Which two actions should the developer take to resolve the throttling errors and optimize stream throughput?
Geçerli olan tümünü seçin
A multiplayer gaming platform operates a matchmaking lobby service that frequently retrieves game mode configurations from an Amazon DynamoDB table. During peak traffic hours, player sign-ins spike, leading to high read latency and ProvisionedThroughputExceededException errors on the table due to the volume of read requests. The development team decides to deploy an Amazon DynamoDB Accelerator (DAX) cluster to cache these configurations. Which of the following implementation steps must the developers perform to successfully resolve the latency issue using DAX caching? (Select two.)
Geçerli olan tümünü seçin
A developer is building a backend service for an IoT-based smart agricultural monitoring system. The system receives real-time telemetry from sensor nodes deployed in the field. Each sensor node publishes status updates containing soil moisture and temperature readings. The serialized payload size for each status update is , and the application receives and writes status updates per second directly to an Amazon DynamoDB table. A management dashboard displays a summary of the last telemetry updates for a specific sensor node by making requests per second using eventually consistent reads. Which two of the following actions should the developer perform to design the database and client access layer efficiently?
Geçerli olan tümünü seçin
A developer is designing an API in Amazon API Gateway that routes incoming client requests to an AWS Lambda function. To keep the Lambda function's logic simple and decoupled from the API structure, the developer wants the function to receive a specific, simplified JSON payload containing only the client's source IP and a custom API header called 'X-App-Version'. The developer wants to avoid parsing the full HTTP request structure within the Lambda function code. Which API Gateway integration strategy should the developer use to meet these requirements?
A developer is designing a document processing system. User-uploaded documents are published to an Amazon SNS topic. Two Amazon SQS queues are subscribed to the topic: Queue A feeds a text-extraction service running on Amazon ECS, which takes up to 45 seconds to process each document, while Queue B feeds an archiving service. During high-load periods, the text-extraction service experiences two problems: many documents are processed multiple times by different ECS tasks, and SQS messages sent to Queue A are occasionally discarded before being processed because the ECS task scale-up takes longer than the queue's default message age limit. Which TWO actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin
An organization enforces a standard error response schema where all HTTP error responses must return a JSON object containing a custom error ID and a descriptive message. A developer deployed a REST API in Amazon API Gateway protected by a Cognito User Pool authorizer. During testing, clients attempting to call the API without a valid token receive the default Gateway response `{"message":"Unauthorized"}`. Which configuration should the developer implement in API Gateway to return the custom error schema?
A developer is building a backend for a conference ticketing application. The ticketing data is stored in an Amazon DynamoDB table with `BookingId` (a unique UUID) as the partition key and no sort key. The developer needs to implement two new requirements:
1. Retrieve all bookings for a specific `EventId` sorted by `BookingTimestamp` in descending order.
2. Process bulk attendee registrations where groups of up to bookings must be written or updated simultaneously. If any booking in the group fails (such as due to a sold-out status or validation error), none of the bookings in the group should be applied.
Which TWO actions should the developer take to meet these requirements efficiently?
Geçerli olan tümünü seçin
A developer is implementing a microservice that processes message batches from an Amazon SQS queue. The processing logic is deployed as an AWS Lambda function with a timeout of minutes. However, the developer notices that some message batches are processed multiple times, and the application logs show that the Lambda function is frequently terminated prematurely. Additionally, the Lambda function code currently initializes the SQS client by passing hardcoded IAM credentials.
Which of the following actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin