• Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • amazon-ecr-plugin
    • None

      Is it possible to leverage ec2 instance profiles rather than iam access keys bound to users for the aws credentials?

          [JENKINS-36189] Credentials from instance profile?

          Ben Walding added a comment -

          Trevor - I've just raised JENKINS-38220 which is likely the base requirement for the ECR plugin to leverage EC2 instance profiles.

          Ben Walding added a comment - Trevor - I've just raised JENKINS-38220 which is likely the base requirement for the ECR plugin to leverage EC2 instance profiles.

          Faheem Nadeem added a comment -

          + 1 to this...

          Faheem Nadeem added a comment - + 1 to this...

          Tamas Szasz added a comment -

          +1. After ~2 years

          Tamas Szasz added a comment - +1. After ~2 years

          Amazon ECR plugin does not execute anything on the Agent, so can not generate a token for the instance profile where the agent it is running. The only solution I think that can works it is to use the AWS CLI to grab the Docker login command and execute it, something like this.

          sh '''
          CMD=$(aws ecr get-login --no-include-email)
          echo "executing: $CMD"
          $CMD
          '''
          

          Ivan Fernandez Calvo added a comment - Amazon ECR plugin does not execute anything on the Agent, so can not generate a token for the instance profile where the agent it is running. The only solution I think that can works it is to use the AWS CLI to grab the Docker login command and execute it, something like this. sh ''' CMD=$(aws ecr get-login --no-include-email) echo "executing: $CMD" $CMD '''

            ifernandezcalvo Ivan Fernandez Calvo
            trbaker Trevor Baker
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: