AWS授权错误

当试图访问ECR中的图像并将其旋转(由别人的代码处理)时,会在下面引发错误。 我希望我有更多的信息,但我所知道的是在EC2实例上运行的代码不能启动我的容器,因为它在Authorization Header缺less一个密钥

Amazon.ECR.AmazonECRException: 'WITH:' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=SET WITH: dotnet user-secrets set RegistryConfig:AccessKeyId/20170615/us-west-1/ecr/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=someguid'. ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.

  • 我的问题是,我在哪里可以find这些键?
  • 如果我在我的ec2实例上进行configuration,它已经设置了一个密钥
  • 我是否需要将它传递给我试图启动的Docker容器?
  • 如果是,那么传递这些值的最好方法是什么?