Development with AWS Services
505 soru
A developer is configuring a serverless application where an AWS Lambda function processes messages from an Amazon SQS queue. The Lambda function must also query an Amazon RDS PostgreSQL database located in a private subnet of a VPC.
During testing, the developer observes two issues:
1. Messages are occasionally processed multiple times by the Lambda function, even though the executions complete successfully. The Lambda function's timeout is set to 60 seconds, and the SQS queue's visibility timeout is set to 30 seconds.
2. The Lambda function fails to establish a connection to the RDS database, resulting in connection timeout errors.
Which two actions should the developer take to resolve these issues? (Select two.)
Geçerli olan tümünü seçin
A developer is building a logistics tracking application that stores package delivery status updates in an Amazon DynamoDB table. The table has a partition key of `PackageID` and a sort key of `StatusTimestamp`. The application needs to retrieve all delivery status updates for a specific `PackageID` that occurred within the last hours. The results must be returned starting with the most recent update first.
Which two actions should the developer take to meet these requirements with the lowest latency and minimal Read Capacity Unit (RCU) consumption? (Select TWO.)
Geçerli olan tümünü seçin
A healthcare startup collects continuous heart rate data from thousands of wearable medical patches. The patches stream telemetry data to an Amazon Kinesis Data Stream that has shards. The stream is experiencing periodic `ProvisionedThroughputExceededException` errors during peak hours, and analysis reveals that a single shard is receiving over of the traffic because the developer chose `device_manufacturer` as the partition key. Which of the following changes to the partition key should the developer implement to resolve the throttling and distribute the load evenly across all shards?
A developer is building a video streaming application that publishes user engagement events to an Amazon Kinesis Data Stream. An AWS Lambda function processes these events in batches. For specific events, such as 'UpgradeAccount', the Lambda function must publish a message to an Amazon EventBridge custom event bus to trigger downstream provisioning workflows.
During high-load testing, the developer observes two issues:
1. The Lambda function frequently runs out of time while processing batches of events.
2. The Lambda function fails to publish events to the EventBridge custom event bus, receiving an AccessDeniedException.
Which combination of actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin
A developer is designing a flight booking platform where reservation records are stored in an Amazon DynamoDB table. The table's partition key is `ReservationID`. The application needs to retrieve all reservations for a specific `FlightID` that currently have a `ReservationStatus` of 'Pending'. The solution must be highly efficient, minimize read latency, and avoid unnecessary read capacity consumption. Which two actions should the developer take to meet these requirements?
Geçerli olan tümünü seçin
A developer is designing a real-time multiplayer game event processor. The game client sends player match telemetry (including player ID, match ID, action type, and score) to an Amazon Kinesis Data Stream. The developer must ensure that events for the same match are processed in the strict order they occurred by the consumer. In addition, the consumer, an AWS Lambda function running in a virtual private cloud (VPC), must query an external SaaS security endpoint over the internet to check for anomalous player behavior.
Which two actions should the developer take to meet these requirements?
Geçerli olan tümünü seçin
A developer is deploying a Java application to an Amazon ECS cluster running on AWS Fargate. The application uses the AWS SDK for Java to write logs to an Amazon CloudWatch Logs group. The ECS task is configured with an IAM task role that has the necessary permissions to write to CloudWatch. However, the container definition also contains the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, which contain temporary credentials used during a previous CI/CD test run. When the application runs, it fails to write logs and throws an ExpiredTokenException. Which action should the developer take to resolve this issue?
A developer is configuring an AWS Lambda function inside a private subnet of a custom VPC to process messages from an Amazon SQS queue. The Lambda function must read database credentials from AWS Secrets Manager and write the processed results to an Amazon DynamoDB table. To satisfy security requirements, the VPC has no internet access, and all traffic must remain within the AWS network.
The developer creates a Gateway VPC endpoint for DynamoDB and an Interface VPC endpoint for Secrets Manager. However, when the Lambda function runs, it fails with connection timeout errors when attempting to access both DynamoDB and Secrets Manager.
Which combination of actions will resolve these connection timeouts? (Select two.)
Geçerli olan tümünü seçin
A developer is migrating a backend AWS Lambda function from a Lambda custom (non-proxy) integration to a Lambda proxy integration on an Amazon API Gateway REST API. Under the custom integration, the Lambda function received a pre-mapped JSON payload containing query parameters and headers, and it returned a simple JSON object:
`{ "status": "success", "data": { "userId": 101 } }`
After configuring the API Gateway to use Lambda Proxy Integration, clients receive a 502 Bad Gateway error on all API requests. Additionally, the Lambda function execution logs show errors indicating that the incoming event format is unexpected.
Which of the following modifications must the developer make to resolve these errors?
A company is developing a desktop-based administration client that must allow authenticated internal users to upload system logs directly to a secure Amazon S3 bucket. The developer wants to manage user registration, sign-in, and password recovery natively within the client, while ensuring that the desktop application receives temporary, limited-privilege AWS credentials to perform the S3 uploads without embedding long-term AWS access keys.
Which architecture should the developer implement to meet these requirements?
A developer is deploying a critical update to a serverless API backend running on AWS Lambda. The application handles high-velocity flash sales where traffic spikes instantly. To eliminate cold start latencies, the developer configures Provisioned Concurrency for the Lambda function. The API backend is integrated with an Amazon API Gateway HTTP API.
During deployment, the developer uploads the new function code, publishes Version of the function, and associates Provisioned Concurrency with Version . However, when testing the API Gateway endpoint that routes traffic to the function using the identifier, clients still experience significant cold start latencies, and CloudWatch metrics show that the provisioned concurrency is not being utilized.
What should the developer do to ensure that the API Gateway endpoint utilizes the provisioned concurrency?
A team of developers is deploying a backend processing application. An AWS Lambda function is configured to run inside a private VPC subnet to securely query an Amazon RDS PostgreSQL database located in another private subnet. The function must also download configuration files from Amazon S3 and make HTTP POST requests to an external, third-party payment processing API on the public internet. Which network configuration should the developer implement to enable these connections while minimizing data transfer costs and maintaining a secure architecture?
An image processing application uses an Amazon SQS queue to trigger an AWS Lambda function that processes batch metadata and fetches external assets via HTTPS. The Lambda function is placed in a private VPC subnet to securely query an Amazon RDS PostgreSQL DB instance in the same VPC. During testing, the developer observes two issues: the Lambda function fails to connect to the external assets API, and several messages from the SQS queue are being processed multiple times, causing duplicate entries in the database. The Lambda function's timeout is set to minutes. Which two actions should the developer take to resolve these issues? (Select two.)
Geçerli olan tümünü seçin
A developer is creating an AWS Lambda function that fetches metadata from an external third-party API and saves the results to an Amazon DynamoDB table. The external API requires an API key for authentication. The developer needs to optimize the function's performance by minimizing connection latency and ensuring the API key is secured according to AWS best practices.
Which two actions should the developer take to meet these requirements? (Select two.)
Geçerli olan tümünü seçin
A developer is designing a real-time inventory management microservice that uses an Amazon DynamoDB table. The application needs to support the following operations during peak traffic:
* `TransactWriteItems` operations per second. Each transaction contains two write actions: one writes a new item of , and another updates an existing item resulting in a final size of .
* standard `PutItem` operations per second, with an average item size of .
* `TransactGetItems` operations per second. Each transaction reads a single item of .
To ensure optimal performance, scalability, and security under the AWS shared responsibility model, which capacity provisioning and development strategy should the developer implement?
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?
Geçerli olan tümünü seçin
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.)
Geçerli olan tümünü seçin
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?
Geçerli olan tümünü seçin
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.)
Geçerli olan tümünü seçin