aws AWS Containers Blog ·

Amazon EKS: Full Request/Response Logging for Compliance

blogobservabilityinfraawsengineeraws-eks
announcement

This post details a solution for capturing complete HTTP request and response bodies on Amazon EKS, addressing a critical gap in compliance logging. Traditional observability tools often miss this data, which is essential for auditors and regulators, potentially leading to compliance failures. The demonstrated approach leverages Envoy's External Processing filter to achieve this without modifying application code.

  • Envoy External Processing Filter for Logging
  • The Compliance Logging Gap on Amazon EKS
  • Need for Full Request and Response Logging
  • Limitations of Alternative Logging Approaches
  • Architecture Overview and Request Flow
Features (1)
  • Envoy External Processing Filter for Logging

    This post demonstrates using Envoy's External Processing (ext_proc) filter on Amazon EKS to capture complete request and response data. This solution provides centralized compliance logic, requires zero application code changes, allows selective capture, and supports data redaction capabilities.

Notes (5)
  • The Compliance Logging Gap on Amazon EKS

    Enterprises running microservices on Amazon EKS often face a compliance gap where metadata like status codes and latency are logged, but the actual request and response bodies—critical for auditors and regulators—are not captured. This can lead to failed audits and regulatory fines.

  • Need for Full Request and Response Logging

    Full request and response logging is crucial for various scenarios, including financial services verifying cardholder data handling and healthcare organizations demonstrating audit trails for protected health information (PHI). Metadata alone is insufficient to answer detailed audit questions.

  • Limitations of Alternative Logging Approaches

    Existing methods like application-level logging, custom C++ Envoy filters, Lua scripting, and some API gateways present significant trade-offs. These include code duplication, maintenance burdens, complex build pipelines, scalability issues, and increased operational complexity.

  • Architecture Overview and Request Flow

    The architecture involves an EKS cluster with Istio, where Envoy sidecar proxies establish a bidirectional gRPC stream to an external processing service. This service captures request headers, body, response headers, and body before Envoy forwards the request to the application, consolidating the data for audit trails.

  • Optimizing gRPC Stream Performance

    To minimize latency impact, the external processing service uses an asynchronous logging pattern. The gRPC handler quickly sends data to a buffered channel, and a background worker asynchronously writes the consolidated audit logs, ensuring data integrity without blocking request processing.

Read the original announcement →

https://aws.amazon.com/blogs/containers/full-request-and-response-compliance-logging-on-amazon-eks/

Related releases