Troubleshooting and Optimization
271 soru
An order processing workflow runs on AWS Lambda and needs to interact with an Amazon RDS PostgreSQL database located inside a private subnet of a VPC. Additionally, the function must publish event messages to an external third-party shipping API. The Lambda function is configured with access to the same private subnets as the database. While database operations succeed, the outbound HTTP requests to the shipping API fail with connection timeout errors.
Which TWO network configuration steps will resolve the outbound connectivity issue to the shipping API?
Geçerli olan tümünü seçin
A developer is migrating a backend REST API from a Lambda Custom Integration to a Lambda Proxy Integration in Amazon API Gateway. The client application is an iOS mobile app that sends a POST request to create user profiles. Previously, when the Lambda function encountered a validation error (such as a missing email address), it would throw an exception, and the developer mapped this exception to a 400 Bad Request HTTP status code using API Gateway Integration Responses. After switching the API method to use the Lambda Proxy Integration, the client application receives a 502 Bad Gateway error instead of the 400 Bad Request validation error, even though the Lambda function execution succeeds with the expected validation error logged. Which of the following modifications should the developer make to the Lambda function's code to resolve this issue and return the expected 400 Bad Request status code?
A developer is troubleshooting an application running on Amazon ECS (using AWS Fargate) in AWS Account A. The application needs to retrieve objects from an Amazon S3 bucket in AWS Account B. The S3 objects are encrypted using a Customer Managed Key (CMK) in AWS Key Management Service (AWS KMS) located in Account B. The ECS Task Role in Account A has been configured with an identity-based policy that allows both s3:GetObject on the bucket and kms:Decrypt on the KMS CMK. However, when the containerized application runs, it receives an Access Denied error. Which two configuration changes must the developer make in Account B to resolve this authorization failure?
Geçerli olan tümünü seçin
An order processing system publishes JSON-formatted logs to Amazon CloudWatch Logs. The logs contain a top-level key named `status`. A representative log event is:
{
"orderId": "1001",
"status": "Failed",
"code": 500
}
Which filter pattern should be applied to the log group to capture these specific events?
A developer has deployed a React-based inventory management portal hosted on a static website on AWS Amplify. The portal needs to send `PATCH` requests to an Amazon API Gateway REST API that integrates with a backend AWS Lambda function using a Lambda Proxy integration.
When the portal attempts to invoke the endpoint, the browser console displays a CORS preflight block error. Additionally, when testing the API directly using a CLI tool, the response returns a `502 Bad Gateway` error. The Lambda function execution logs show that the function completes successfully, but it returns a serialized JSON string containing only the inventory data.
Which two actions should the developer take to resolve these issues? (Select two.)
Geçerli olan tümünü seçin
A developer is troubleshooting a serverless application where an Amazon SQS queue triggers an AWS Lambda function to process batch invoice reports. Under normal load, the invoices are processed successfully. However, during peak hours when processing times increase, the developer notices that some invoices are generated multiple times. CloudWatch logs show that the Lambda function occasionally runs for up to seconds before completion, which is close to its configured timeout. The SQS queue's visibility timeout is currently set to seconds. Which configuration change will resolve this duplicate processing issue?
An AWS Lambda function written in Node.js queries an Amazon DynamoDB table using the AWS SDK for JavaScript (v3). The function's configuration has active tracing enabled. However, when viewing traces in the AWS X-Ray console, only the Lambda service and function segments are displayed, while the downstream queries to DynamoDB are completely missing. What action must be taken to ensure that these DynamoDB queries are recorded as part of the traces?
A developer has installed and configured the Unified CloudWatch Agent on a fleet of Amazon EC2 instances to stream application logs to Amazon CloudWatch Logs. However, after starting the agent, the developer notices that no log groups or log streams are being created in the CloudWatch console.
Which TWO actions should the developer take to troubleshoot and resolve this issue?
Geçerli olan tümünü seçin
An application deployed in an Amazon ECS container on AWS Fargate uses the awslogs log driver to stream stdout logs to an Amazon CloudWatch Logs log group. The application outputs logs in JSON format, but the container's logging framework prepends a plaintext timestamp to each log line, resulting in log events formatted as follows:
`2026-07-14T12:00:00Z {"level": "ERROR", "response": {"status_code": 504, "error": "Gateway Timeout"}}`
The developer created a CloudWatch Metric Filter with the pattern `{ $.response.status_code = 504 }` to monitor these errors, but the metric is not registering any data. Which two actions should the developer take to resolve this issue and ensure the metrics are accurately captured?
Geçerli olan tümünü seçin
A developer has a Node.js application deployed in Docker containers on Amazon ECS. The application writes data to an Amazon DynamoDB table using the AWS SDK for JavaScript (v3) and calls an external payment processing API over HTTPS using the Node.js native https module. The developer has deployed the AWS X-Ray daemon container as a sidecar in the ECS task definition and verified that the daemon is running and receiving data. However, the X-Ray console only shows the container node without any downstream nodes for DynamoDB or the payment API.
Which two actions should the developer take to ensure that both the DynamoDB calls and the external HTTPS API calls are instrumented and visible in the X-Ray service map?
Geçerli olan tümünü seçin
An organization's deployment pipeline fails during a step that executes an AWS CloudFormation stack template. The pipeline is configured to update a stack that has a status of ROLLBACK_COMPLETE following a failed initial creation attempt. Which actions should a developer take to resolve this issue and enable a successful deployment? (Choose two.)
Geçerli olan tümünü seçin
A mobile gaming application writes daily player high scores to an Amazon DynamoDB table. Although the table's total provisioned write capacity is significantly higher than the aggregate write rate, the application frequently experiences ProvisionedThroughputExceededException errors because all writes use the current date (e.g., YYYY-MM-DD) as the partition key. Which action should the developer take to resolve this throttling issue?
A developer is troubleshooting an AWS Lambda function written in Python that processes transaction records. The function intermittently fails with a memory limit exceeded error after running successfully for several hours under continuous traffic. The developer reviews the code and notes that a helper class initializes an in-memory cache list in the global scope, outside the handler function, to store transaction IDs. Which of the following is the most likely cause of this issue and the correct resolution?
A developer is troubleshooting a CloudWatch Logs subscription filter that streams log events from a Lambda function's log group to an Amazon Kinesis Data Firehose delivery stream. The delivery stream successfully writes data to an Amazon S3 bucket, but the developer notices that no logs from the subscription filter are arriving in S3. The CloudWatch metric DeliveryErrors for the subscription filter shows a consistently high count. The developer verifies that the Firehose delivery stream is active and that the IAM role specified in the subscription filter has a permissions policy allowing firehose:PutRecord and firehose:PutRecordBatch on the delivery stream. Which of the following is the most likely cause of this issue?
A developer is troubleshooting a Java application running on Amazon ECS Fargate that receives HTTP requests and uses the AWS SDK for Java to write metadata to an Amazon DynamoDB table. The developer runs the AWS X-Ray daemon as a sidecar container in the ECS task. The X-Ray daemon logs confirm that it is successfully receiving trace segments and uploading them to AWS X-Ray. However, in the X-Ray trace map, the downstream calls to DynamoDB do not appear. Which action should the developer take to ensure DynamoDB calls are included in the trace?
A developer needs to monitor an AWS Lambda function that occasionally times out during execution. The developer wants to count the occurrences of these timeouts and receive an alert when they happen. Which of the following steps should the developer perform to meet these requirements? (Select TWO.)
Geçerli olan tümünü seçin
A developer attempts to deploy a new stack named `prod-app-backend` using AWS CloudFormation. The initial stack creation fails due to a syntax error in the resource properties, and the stack status transitions to `ROLLBACK_COMPLETE`. After correcting the syntax error in the template, the developer tries to perform a stack update using the corrected template and the same stack name, but the update fails. Which action must the developer take to deploy the stack successfully?
A developer is configuring a custom Amazon CloudWatch metric filter to monitor performance metrics from an API gateway service. The service writes structured JSON logs to a CloudWatch log group. A representative log event has the following structure:
{
"service": "payment-api",
"transaction": {
"success": true,
"amount": 250.00
},
"latency": 150
}
The developer needs to create a metric filter that publishes to a custom metric named `HighValueLatency` in the `PaymentMetrics` namespace. The metric must record the `latency` value, but only for events where the transaction `success` is `true` and the transaction `amount` is strictly greater than .
Which TWO configurations or values must the developer specify in the metric filter settings to achieve this?
Geçerli olan tümünü seçin
A developer is configuring a multi-account CI/CD pipeline using AWS CodePipeline. The pipeline executes an AWS CodeBuild project in Account A. As part of the build spec, the project runs a deployment script that is designed to deploy an AWS CloudFormation stack in Account B. During execution, the build fails at the deployment step with the error: `An error occurred (AccessDenied) when calling the AssumeRole operation`. Which two actions should the developer take to resolve this failure? (Select TWO.)
Geçerli olan tümünü seçin
A client-side Angular application hosted on `https://claims.healthportal.com` sends a `PUT` request to an Amazon API Gateway REST API secured by a custom Lambda Authorizer. The API is integrated with a backend Lambda function using Lambda Proxy Integration. When users attempt to perform actions with expired session tokens, the application's browser console displays a CORS preflight blocked error, and the request fails without displaying the expected session expiration message to the user. Which actions should the developer take to resolve the CORS preflight blocked error and allow the frontend to receive the correct status codes? (Select TWO.)
Geçerli olan tümünü seçin