Skip to main content

Easy interaction with AWS ECR from a CLI

Project description

awsecr

CLI to interact with AWS ECR service.

Description

awsecr is a Python module that allows an end user to access an AWS ECR repository to do the following:

  • pull/push images
  • list available repositories
  • list available images per repository, summarizing all founded vulnerabilities.

Authentication between AWS ECR and the local Docker client is automatic.

See TODO.txt for next planned features.

Samples outputs

Listing repositories available:

$ awsecr repos
┌ All ECR repositories ──────────────┬─────────────────────────────────────────────────────────────────────────────────┬────────────────┬───────────────┐
│ Name                               │ URI                                                                             │ Tag Mutability │ Scan on push? │
├────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────┼────────────────┼───────────────┤
│ nodejs                             │ 012345678910.dkr.ecr.us-east-1.amazonaws.com/nodejs                             │ IMMUTABLE      │ True          │
│ spark-py                           │ 012345678910.dkr.ecr.us-east-1.amazonaws.com/spark-py                           │ MUTABLE        │ False         │
│ hive-metastore                     │ 012345678910.dkr.ecr.us-east-1.amazonaws.com/hive-metastore                     │ IMMUTABLE      │ True          │
└────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────┴────────────────┴───────────────┘

Listing images from a repository:

┌ Docker images at api-foobar123 ──────────────────────────────────┬─────────────┬───────────┬───────────────────────────┬─────────────────┐
│ Image                                                            │ Scan status │ Size (MB) │ Pushed at                 │ Vulnerabilities │
├──────────────────────────────────────────────────────────────────┼─────────────┼───────────┼───────────────────────────┼─────────────────┤
│ 012345678910.dkr.ecr.us-east-1.amazonaws.com/api-foobar123:1.3.6 │ COMPLETE    │ 205.1     │ 2021-12-09 18:06:20-03:00 │ 1               │
│ 012345678910.dkr.ecr.us-east-1.amazonaws.com/api-foobar123:1.3.5 │ COMPLETE    │ 133.8     │ 2021-12-09 15:42:28-03:00 │ 1               │
└──────────────────────────────────────────────────────────────────┴─────────────┴───────────┴───────────────────────────┴─────────────────┘

How to install

The preferred way is to install it from https://pypi.org with:

pip install awsecr

How to use it

You can check the awsecr CLI online help:

$ awsecr -h
usage: awsecr [OPERATION]

Easier interaction with AWS ECR to manage Docker images.

positional arguments:
  {repos,image}      the desired operation with the registry.

optional arguments:
  -h, --help         show this help message and exit.
  --image IMAGE      the local Docker image to use together with the image --push sub operation.
  --list REPOSITORY  sub operation for "image" operation. List all images from the repository.
  --push REPOSITORY  sub operation for "image" operation. Pushes a Docker image to the repository.

The "repos" operation requires no additional options. It lists the available
ECR repositories for the current AWS user credentials.

References

Other open source projects that are related to awsecr:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awsecr-0.3.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

awsecr-0.3.0-py2.py3-none-any.whl (20.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file awsecr-0.3.0.tar.gz.

File metadata

  • Download URL: awsecr-0.3.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for awsecr-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c3fb7cadcd4a5202992d44ecc6562f4d9d8090fcddeb124b52162db2340ce344
MD5 8532ec1d3f389af3aa86f3b2c462d8fd
BLAKE2b-256 585f3d6d86b4e6d0f88e2a8fcd23807ad126afe33ffe6c8dfea267374cbb80f3

See more details on using hashes here.

File details

Details for the file awsecr-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: awsecr-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for awsecr-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c23ff4f0d80353c62b1e11b25060499aaed248ee535096e0b71425351984c7c
MD5 55b50848cbecc55a672d0e0f44d63b56
BLAKE2b-256 93631c95266129b33db93b145d8277dbaeb3b121969b6e223bb116cfcea3b759

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page