Can not able to deploy Private ECR to Personal Linux machine using greengrass. while deploying component is not able to download Artifact.(Reason: Failed to get auth token for docker login)


I created a component using "Recipe as YAML"

RecipeFormatVersion: '2020-01-25'
ComponentName: com.example.MyPrivateDockerComponent
ComponentVersion: '1.0.0'
ComponentDescription: 'A component that runs a Docker container from a private Amazon ECR image.'
ComponentPublisher: Amazon
    VersionRequirement: ~2.0.0
    VersionRequirement: ~2.0.0
  - Platform:
      os: all
        Run: docker run <accountID>
      - URI: "docker:<accountID>"

i have tried to install docker-ce docker-ce-cli by using

      RequiresPrivilege: true
      Script: apt-get install docker-ce docker-ce-cli

after component created i tried to deploy it in core but it is showing:-

FAILED_NO_STATE_CHANGE: Failed to download artifact name: 'docker:<accountID>' for component com.example.Test7-1.0.0, reason: Failed to get auth token for docker login
1 Answer

Hi. Have you followed the pre-requisites for running a Docker container in a component? Included in that, for using a Docker image stored in a private ECR repository, you need to add the following to your Greengrass device role:

  "Version": "2012-10-17",
  "Statement": [
      "Action": [
      "Resource": [
      "Effect": "Allow"
profile pictureAWS
answered a year ago
  • Hi, thanks for response i have provided Role to greengrass device the same error is showing after that also

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions