CloudWatch agent log shows `AccessDeniedException: User: arn:aws:sts::...:assumed-role/... is not authorized to perform: logs:PutLogEvents`
BeginnerTroubleshootingTracing, OpenTelemetry and CloudWatch
Answer
Likely causes → Role permissions cover metrics but not logs, or log group is encrypted with a KMS key the role can't use.
Diagnose → Read the agent log; check the role and the log group's kmsKeyId.
Fix → Grant logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents, logs:DescribeLogStreams (included in CloudWatchAgentServerPolicy) and KMS kms:GenerateDataKey/kms:Encrypt if needed.
Prevent → Use a single managed policy for all agent hosts.
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