Skip to content

[AWS] [API Gateway] Logs data stream #6991

@lucian-ioan

Description

@lucian-ioan

Issue for API Gateway Logs integration. Describing fields, setup as well as useful official documentation.

  1. Set up API Gateway Logs:
  • Enable logging for your API Gateway service by accessing the API Gateway management console or using the AWS Command Line Interface (CLI).
  1. Direct Logs to CloudWatch:
  • Create a CloudWatch Logs group specifically for storing the API Gateway logs. This helps organize and centralize the log data.
  • Configure the API Gateway service to send the generated logs to the designated CloudWatch Logs group.
  • Define the log retention period to ensure that the logs are retained for the desired duration based on your monitoring and compliance requirements.
  1. Fields and detailed description for each field:
  • The requestId field allows for tracing and correlation of log entries associated with a specific API request, aiding in understanding the request lifecycle and troubleshooting issues.

  • The ip field reveals the source IP address of the client, assisting in identifying traffic patterns, detecting threats or suspicious activities, and understanding geographical distribution.

  • The requestTime field provides the timestamp of the API request, enabling analysis of request patterns, resource allocation optimization, and troubleshooting timing-related or performance issues.

  • The httpMethod field indicates the HTTP method used in the request, facilitating understanding of client operations, monitoring distribution of methods, and identifying irregularities or endpoint misuse.

  • The routeKey field represents the API endpoint or route associated with the request, aiding in the identification of frequently accessed endpoints, monitoring route distribution, and pinpointing performance issues.

  • The status field captures the HTTP response status code, facilitating monitoring of request success or failure, tracking distribution of response codes, and identifying potential issues causing errors or failures.

  • The protocol field indicates the communication protocol used in the API request, helping to identify compatibility issues, performance differences, and potential security concerns associated with specific protocols.

  • The responseLength field represents the size of the response returned by the API Gateway, enabling monitoring of response sizes, identification of performance bottlenecks, and optimization of resource allocation and caching strategies.

  1. Documentation:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions