- Newest
- Most votes
- Most comments
Hello,
I see your Docker images are stored in an Amazon ECR private repository, and you are encountering error when logging into ECR.
- Make sure that you installed the latest AWS CLI version 2. We recommend that you use the AWS CLI version 2. For more information, see Installing the AWS CLI in the AWS Command Line Interface User Guide.
- Be sure that you have included the token exchange service component as a dependency in the Docker container component. Also, verify the Greengrass device IAM role if it has proper permissions. It must allow the
ecr:GetAuthorizationToken
,ecr:BatchGetImage
, andecr:GetDownloadUrlForLayer
actions, as shown in the following example IAM policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchGetImage",
"ecr:GetDownloadUrlForLayer"
],
"Resource": [
"*"
],
"Effect": "Allow"
}
]
}
Hello, the error in your screenshots appears to be due to misconfiguration for docker and Greengrass does not deal with docker installation or configuration, you might try the few suggestions from https://github.com/docker/cli/issues/2229 , as described in this issue you may have golang-docker-credential-helpers
installed which also needs pass
installed.
For your Greengrass deployment I believe this error occurs before the usage of TokenExchangeService for ECR login/image download, so as suggested by others on this question also make sure your policies and roles are correctly configured. Thanks.
First thing I suggest for you to simulate your policy/role that is attached. See if it giving successful and denied. That will give you clue if it stopped in first place. https://policysim.aws.amazon.com/home/index.jsp?#
Relevant content
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
First thing I suggest for you to simulate your policy/role that is attached. See if it giving successful and denied. That will give you clue if it stopped in first place. https://policysim.aws.amazon.com/home/index.jsp?#