OpsCanary
kubernetesnetworkingPractitioner

Mastering Full Request and Response Logging on Amazon EKS

5 min read AWS Containers BlogJul 7, 2026Reviewed for accuracy
Share
PractitionerHands-on experience recommended

Full request and response compliance logging is essential for maintaining transparency and accountability in microservices architectures. It allows you to capture all aspects of HTTP interactions, which is vital for debugging, auditing, and regulatory compliance. By leveraging Envoy’s External Processing filter, you can log complete request and response data seamlessly, without touching your application code.

When an HTTP request enters your system, it follows a defined path. The client sends an HTTPS request, which is resolved by DNS to a Network Load Balancer (NLB) in your VPC. The NLB forwards this request to the Istio Ingress Gateway within your Amazon EKS cluster. The Ingress Gateway routes the traffic into the service mesh based on Gateway and Virtual Service resources. Once matched, the request hits the Envoy sidecar proxy, which is automatically injected into each pod by Istio. The Envoy sidecar then opens a bidirectional gRPC stream to the external processing service, a standalone Kubernetes Deployment running a gRPC server that implements the Envoy External Processing API. After the ext_proc server approves both the request and response phases, Envoy forwards the complete request to the application container, processes it, and returns the response. This entire interaction culminates in a single audit log entry, correlating all four phases—request headers, request body, response headers, and response body—using the x-request-id header.

In production, ensure you have the necessary tools installed, including AWS CLI, Terraform, and kubectl. The setup involves cloning a sample repository and initializing Terraform to manage your infrastructure. Be aware that you are working with an Amazon EKS 1.35 cluster in Auto Mode, which simplifies node provisioning and scaling. Pay attention to the integration of Envoy and Istio, as misconfigurations can lead to logging gaps or performance issues.

Key takeaways

  • Utilize Envoy’s External Processing filter to capture full request and response data without modifying application code.
  • Ensure your traffic flows through the Istio Ingress Gateway for proper routing and logging.
  • Correlate all four phases of logging using the x-request-id header for comprehensive audit trails.
  • Set up your environment with AWS CLI, Terraform, and other necessary tools before implementation.
  • Monitor your Amazon EKS cluster version to leverage the latest features and improvements.

Why it matters

In production, having complete visibility into request and response data can significantly enhance your ability to troubleshoot issues and ensure compliance with regulatory standards. This transparency is crucial for maintaining trust and accountability in microservices environments.

Code examples

Bash
git clone https://github.com/aws-samples/sample-full-request-response-logging-on-eks.git
cd sample-full-request-response-logging-on-eks
Bash
cd terraform
tf init
Bash
terraform apply -auto-approve

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Better StackSponsor

Unified observability — logs, uptime monitoring, and on-call in one place. Used by 50,000+ engineering teams to ship faster and sleep better.

Try Better Stack free →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.