I'm using X-Ray Daemon with Fargate. Unfortunately in the logs of the daemon I see errors like:
[Error] Sending segment batch failed with: NoCredentialProviders: no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors Warn] Delaying sending of additional batches by 0 seconds
AWS X-Ray works with IAM: permission: AWSXrayFullAccess
I already checked:
- https://github.com/aws-samples/aws-xray-fargate
- https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-guide.pdf
{
"name" : "xray-daemon",
"image" : "amazon/aws-xray-daemon",
"user" : "1337",
"essential" : true,
"cpu" : "32",
"memoryReservation" : "256",
"portMappings" : [
{
"containerPort" : 2000,
"protocol" : "udp"
}
]
}
],
"requiresCompatibilities" : [ "FARGATE" ],
"taskRoleArn" : "arn:aws:iam::123456789012:role/ecsTaskRole",
"executionRoleArn" : "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"networkMode" : "awsvpc"
}
I got this error when my version of the x-ray deamon was old.
Follow this as guidance to update your x-ray deamon if it is running on ECS:
https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html