Skip to content

AWS API Gateway Integration #6058

@SubhrataK

Description

@SubhrataK

Requirements Summary

Amazon API Gateway is an AWS service that helps developers to create, publish, maintain, monitor, and secure APIs at scale. It supports creation of three types of APIs:

  1. REST APIs
  2. HTTP APIs
  3. WebSocket APIs

Note: Supported versions: Amazon API Gateway Version 2 API Reference.

Metrics

The scope of this issue is to provide an OOTB integration that collects metrics and logs for each of these API types. The list of metrics available are as follows:

  • REST APIs

    • 4XXError - The number of client-side errors captured in a given period.

    • 5XXError - The number of server-side errors captured in a given period.

    • CacheHitCount - The number of requests served from the API cache in a given period.

    • CacheMissCount - The number of requests served from the backend in a given period, when API caching is enabled.

    • Count - The total number API requests in a given period.

    • IntegrationLatency - The time between when API Gateway relays a request to the backend and when it receives a
      response from the backend.

    • Latency - The time between when API Gateway receives a request from a client and when it returns a response to the
      client. The latency includes the integration latency and other API Gateway overhead.

      The user shall be able to filter the metrics based on these dimensions:
      ApiName - Filters API Gateway metrics for the REST API with the specified API name.
      ApiName, Method, Resource, Stage - Filters API Gateway metrics for the API method with the specified API
      name, stage, resource, and method.
      ApiName, Stage - Filters API Gateway metrics for the API stage resource with the specified API name and stage.

  • HTTP APIs
    All metrics listed above under Rest APIs and:

    • DataProcessed - The amount of data processed in bytes.

    The user shall be able to filter the metrics based on these dimensions:

         ApiId - Filters API Gateway metrics for an API with the specified API ID.
         ApiId, Stage - Filters API Gateway metrics for an API stage with the specified API ID and stage ID.
         ApiId, Stage, Route - Filters API Gateway metrics for an API method with the specified API ID, stage ID, and route ID.
    
  • WebSocket APIs

    • ConnectCount - The number of messages sent to the $connect route integration.
    • MessageCount - The number of messages sent to the WebSocket API, either from or to the client.
    • IntegrationError - The number of requests that return a 4XX/5XX response from the integration.
    • ClientError - The number of requests that have a 4XX response returned by API Gateway before the integration is
      invoked.
    • ExecutionError - Errors that occurred when calling the integration.
    • IntegrationLatency - The time difference between API Gateway sending the request to the integration and API
      Gateway receiving the response from the integration. Suppressed for callbacks and mock integrations.

    The user shall be able to filter metrics based on these dimensions:
    ApiId - Filters API Gateway metrics for an API with the specified API ID.
    ApiId, Stage - Filters API Gateway metrics for an API stage with the specified API ID and stage ID.
    ApiId, Stage, Route - Filters API Gateway metrics for an API method with the specified API ID, stage ID, and route ID.

API Gateway Logs

API Gateway Logs contain information about the requests and responses that pass through the API Gateway, including the request and response headers, the request payload, and the response payload. API Gateway supports logging to CloudWatch, Amazon S3, Amazon Kinesis Data Firehose, and AWS Lambda.

The Integration shall support: JSON, CSV, CLF, and XML type log formats for all API types. For a list of variables supported in the logs, please refer: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging-variables.html and https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-logging.html

Tasks

Metadata

Metadata

Assignees

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