aws-ecr-get-login-password

command module
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 8 Imported by: 0

README

Get AWS ECR login password

This is a simple utility written in Go to build a portable binary whose sole purpose is to mimick aws ecr get-login-password. This is useful in contexts like Alpine Linux based container images, where glibc cannot be used and AWS CLI v2 doesn't work.

Usage

$ aws-ecr-get-login-password | docker login -u AWS --password-stdin 000000000000.dkr.ecr.eu-south-1.amazonaws.com

⚠ Remember to replace 000000000000.dkr.ecr.eu-south-1.amazonaws.com with your actual ECR repository!

Credentials

The binary is as simple as it can be. It does not accept any option, but it infers configuration from the environment using most of the environment variables AWS CLI uses as well. A non-exhaustive list of environment variables that can be set to change the way this binary retrieves credentials are:

  • AWS_DEFAULT_REGION
  • AWS_PROFILE
  • AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and optionally AWS_SESSION_TOKEN
  • AWS_IAM_ROLE
  • AWS_WEB_IDENTITY_TOKEN_FILE

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL