CloudWatch agent on a private subnet logs `RequestError: send request failed ... dial tcp ...:443: i/o timeout`
IntermediateTroubleshootingTracing, OpenTelemetry and CloudWatch
Answer
Likely causes → No NAT gateway and no VPC interface endpoints for monitoring and logs.
Diagnose →
curl -sv https://monitoring.ap-south-1.amazonaws.com 2>&1 | head
aws ec2 describe-vpc-endpoints --filters Name=vpc-id,Values=vpc-xxx
Fix → Create interface endpoints com.amazonaws.<region>.monitoring and com.amazonaws.<region>.logs with private DNS enabled and a security group allowing 443 from the instances.
Prevent → Include these endpoints in the VPC Terraform module.
More on Tracing, OpenTelemetry and CloudWatch
Traces show only the frontend span; downstream services start new tracesIntermediateTraces break at the API gateway / ingress controllerIntermediateNo traces at all arrive; the app logs `Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/127.0.0.1:4317`BeginnerSDK error `Unimplemented` / `404 Not Found` when exporting to the collectorIntermediateOTel collector logs `Exporting failed. Will retry the request after interval. {"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "rpc error: code = Unavailable desc = connection error"}`IntermediateCollector logs `Dropping data because sending_queue is full`Advanced