Troubleshooting and Optimization
271 soru
A developer is configuring an Amazon CloudWatch Logs subscription filter to stream logs from an application to an Amazon Kinesis Data Stream. The application logs are structured JSON documents that contain a root-level key `statusCode` and a nested object `errorInfo` with a key `severity`. The developer wants the subscription filter to select only log events where `statusCode` is 500 and `severity` is 'CRITICAL'. Which filter pattern must the developer use?
A web application hosted on `https://manager.fleet-operations.com` sends an HTTP `POST` request to an Amazon API Gateway REST API. The API is integrated with a backend AWS Lambda function using a Lambda Proxy integration. Although the developer enabled CORS on the API Gateway resource, the browser console displays a CORS preflight blocked error and a `502 Bad Gateway` status. Which two actions must the developer take to resolve these errors?
Geçerli olan tümünü seçin
A legacy web application deployed on an Amazon EC2 instance writes log events in a space-delimited format to `/var/log/web-app/access.log`. The fields in the log are ordered as: `ip`, `user`, `date`, `request`, `status_code`, and `bytes`. A developer installs the unified CloudWatch agent on the instance to stream these logs to Amazon CloudWatch Logs and configures a metric filter to count the occurrences of HTTP 5xx server errors. However, after starting the agent, no log events appear in the CloudWatch Logs console. In addition, during testing, the metric filter fails to match any log events representing server errors. Which two actions should the developer take to resolve these issues? (Select TWO.)
Geçerli olan tümünü seçin
A Svelte single-page application hosted on `https://dashboard.analytics-core.org` sends an HTTP `POST` request to an Amazon API Gateway REST API. The API is configured to use a Lambda proxy integration with a backend AWS Lambda function. When the application executes the request, the web browser console displays a `502 Bad Gateway` error, followed by a CORS error stating that the `Access-Control-Allow-Origin` header is missing. The developer confirms that CORS has already been enabled on the API Gateway resource for all methods. What must the developer do to resolve this error?
A developer is setting up a new AWS CodeBuild project to compile an application. The developer creates an IAM role named CodeBuildServiceRole to serve as the service role for the project and attaches policies allowing access to Amazon S3 and Amazon CloudWatch Logs. However, when the developer attempts to start the build run, it fails immediately with the following error:
CodeBuild is not authorized to perform: sts:AssumeRole on arn:aws:iam::123456789012:role/CodeBuildServiceRole
What action should the developer take to resolve this authorization failure?
A telemetry ingestion application named ThermoSense logs sensor status updates to an Amazon DynamoDB table. The table is configured with provisioned write capacity and uses SensorModel as the partition key. During a firmware update deployment, the application encounters multiple ProvisionedThroughputExceededException errors. CloudWatch metrics indicate that a specific, widely deployed sensor model is generating a high volume of writes, resulting in a hot partition. Which TWO actions should the developer take to resolve the write throttling and ensure even load distribution across partitions? (Select TWO.)
Geçerli olan tümünü seçin
A React Native mobile application sends an HTTP POST request to an Amazon API Gateway REST API endpoint to update a user's profile. The API uses a Lambda proxy integration with an AWS Lambda function. Users report receiving a 502 Bad Gateway error when saving their profile updates. The developer checks the CloudWatch logs for the Lambda function and confirms it executes successfully, returning the following output:
{
"message": "Profile updated successfully",
"status": "success"
}
Which of the following explains why the application receives the 502 Bad Gateway error and identifies the correct solution?
A developer is troubleshooting a Vue.js single-page application that is receiving a 502 Bad Gateway error when calling a POST endpoint on an Amazon API Gateway REST API. The API uses a Lambda proxy integration with a backend AWS Lambda function. In the Amazon CloudWatch logs, the developer confirms that the Lambda function executed successfully and returned the following JSON object:
{
"status": "success",
"data": {
"orderId": "78910"
}
}
Which of the following describes the root cause and the correct resolution for this error?
An application running in Amazon ECS container tasks writes structured JSON logs to Amazon CloudWatch Logs. A sample log event is:
{
"eventType": "DatabaseError",
"details": {
"duration": 4500,
"status": "failed"
}
}
A developer wants to create a CloudWatch Metric Filter to monitor events where the event type is "DatabaseError" and the nested query duration is greater than milliseconds. The developer initially configures a metric filter with the pattern `[eventType = "DatabaseError", details.duration > 4000]`, but notices that the metric is not being published and no matches are found. Which of the following actions must the developer take to resolve this issue and successfully monitor the database errors? (Select TWO.)
Geçerli olan tümünü seçin
A developer is implementing fine-grained access control for a mobile application. Users authenticate via an Amazon Cognito User Pool, and the application needs to write user-specific profile data to an Amazon DynamoDB table named `UserProfiles`. The table's partition key is `UserId` (String). The developer created an Amazon Cognito Identity Pool to provide temporary AWS credentials to authenticated users and attached an IAM policy to the authenticated role that uses the `dynamodb:LeadingKeys` condition. However, when the application attempts to write data to the DynamoDB table, the API calls fail with an `AccessDeniedException` error. Which two actions must the developer take to resolve these authorization failures?
Geçerli olan tümünü seçin
A developer is troubleshooting an application that writes space-delimited log events to an Amazon CloudWatch Logs log group. A sample log event is:
`2026-07-14T12:00:00Z INFO 192.168.1.50 GET /index.html 200 125`
The fields in the log event represent the timestamp, severity, client IP address, HTTP method, resource path, status code, and response time in milliseconds, in that order.
The developer wants to create a CloudWatch Logs metric filter that counts all requests where either the status code is or the response time is greater than .
Which of the following filter patterns must the developer use to correctly implement this metric filter?
A sports streaming application named FanStream logs viewer chat messages during live events. The chat messages are written to an Amazon DynamoDB table with EventID as the partition key and Timestamp as the sort key. During highly anticipated matches, the application experiences frequent ProvisionedThroughputExceededException errors on write operations, even though the total consumed write throughput is well below the table's provisioned capacity. Which of the following actions should the developer take to resolve this issue? (Select TWO.)
Geçerli olan tümünü seçin
An e-commerce application deployed on Amazon ECS writes structured JSON logs to Amazon CloudWatch Logs. A developer needs to create a CloudWatch metric filter to count the occurrences of HTTP 504 Gateway Timeout errors. A sample log event is:
{
"request": {
"path": "/checkout",
"responseCode": 504
}
}
Which filter pattern must the developer use to correctly match this log event?
A developer is troubleshooting an application named PagePublish that stores metadata for online articles in an Amazon DynamoDB table. The table is configured with provisioned read capacity and uses ArticleStatus (such as DRAFT or PUBLISHED) as the partition key. During peak traffic hours, users experience high latency, and the application logs show numerous ProvisionedThroughputExceededException errors. Upon reviewing CloudWatch metrics, the developer notes that the read capacity is heavily consumed on a single partition, while other partitions remain idle. Which of the following is the most effective way to resolve this issue and prevent future throttling?
A developer is deploying a Go-based web application to Amazon EC2 instances. The application logs HTTP requests in a custom space-delimited format to /var/log/app/web.log. The fields in each log entry are: IP, client, user, datetime, request_path, response_status, and response_time_ms. The developer wants to use the unified CloudWatch agent to publish these logs to CloudWatch Logs and then create a metric filter to track only requests that returned an HTTP 404 response status. Which two configuration steps must the developer perform to meet these requirements?
Geçerli olan tümünü seçin
An order ingestion application named OrderSync processes real-time transaction updates and writes them to an Amazon DynamoDB table. The table is configured with provisioned write capacity. During high-traffic flash sales, the application experiences a high rate of ProvisionedThroughputExceededException errors. CloudWatch metrics indicate that the overall write capacity consumption is well below the table's provisioned limit, but the write operations are concentrated on a small number of partition keys representing trending items.
Which TWO actions should the developer take to resolve these throttling issues? (Select TWO.)
Geçerli olan tümünü seçin
A developer is troubleshooting a serverless application where an AWS Lambda function has a configured timeout of 15 seconds. The function is designed to write a custom JSON log entry to Amazon CloudWatch Logs at the end of its execution, structured as { "requestID": "123-456", "status": "COMPLETED", "executionTimeMs": 1250 }. If a database delay occurs, the function catches it and logs { "requestID": "123-456", "status": "ERROR", "errorType": "DatabaseTimeout" }. To track performance issues and failures, the developer configures a CloudWatch Metric Filter with the pattern { (.executionTimeMs > 15000) }. During testing, several invocations time out, but the metric filter does not register any data points. Why is the metric filter failing to capture these timeout events?
A fleet management system stores real-time diagnostics for delivery vehicles in an Amazon DynamoDB table. To minimize read latency and prevent database load, a developer deploys a DynamoDB Accelerator (DAX) cluster. The developer implements a background process that runs periodic Scan operations via the DAX client to pre-warm the cache. However, when the dashboard application performs GetItem calls to retrieve individual vehicle details, it continues to experience high read latency and triggers ProvisionedThroughputExceededException errors on the DynamoDB table. Which action should the developer take to resolve the performance bottleneck and utilize the DAX cache effectively?
A document collaboration platform named DocuCollab tracks real-time document editing events and writes them to an Amazon DynamoDB table. The table is configured with provisioned write capacity and uses the DocumentId as the partition key. During peak hours, a small number of extremely popular shared documents experience heavy, concurrent editing activity. This results in ProvisionedThroughputExceededException errors and writes are dropped, even though the total consumed write capacity is well below the table's provisioned limit.
Which combination of actions will resolve this issue? (Select TWO.)
Geçerli olan tümünü seçin
An e-commerce checkout application named CartCheckout records transaction logs in Amazon DynamoDB. The table uses CheckoutDate (formatted as YYYY-MM-DD) as the partition key and TransactionID as the sort key. During a flash sale event, the application experiences multiple ProvisionedThroughputExceededException errors when writing to the table, even though the total consumed Write Capacity Units (WCUs) are well below the table's total provisioned limits. Which action should the developer take to resolve the write throttling and optimize the table's write performance?