2

我正在使用带有 Fargate 的 X-Ray 守护程序。不幸的是,在守护进程的日志中,我看到如下错误:

[错误] 发送分段批处理失败:NoCredentialProviders:链中没有有效的提供者。已弃用。有关详细消息,请参阅 aws.Config.CredentialsChainVerboseErrors Warn] 将额外批次的发送延迟 0 秒

AWS X-Ray 与 IAM 一起使用:权限:AWSXrayFullAccess

我已经检查过:

{
 "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"
} 
4

1 回答 1

0

您应该检查您的角色权限角色,我使用相同的执行和 taskRoleArn。我的角色包含这些政策

  • arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
  • arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy
  • arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
  • arn:aws:iam::aws:policy/AWSXRayFullAccess

并检查角色的信任关系。我用过的:

  • ecs-tasks.amazonaws.com
  • ecs.amazonaws.com
  • c2.amazonaws.com
于 2021-08-20T23:55:07.777 回答