Skip to main content

awsecr

Python application

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

The output samples will roughly look like the ones generated at the terminal by the CLI. Expect to have better output in the terminal.

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.5 │ COMPLETE    │ 205.1      │ 2021-12-09 18:06:20-03:00 │ 1/10/118/51/274/22 │
│ 012345678910.dkr.ecr.us-east-1.amazonaws.com/api-foobar123:1.3.6 │ COMPLETE    │ 133.8      │ 2021-12-09 15:42:28-03:00 │ 1/10/118/51/274/22 │
└──────────────────────────────────────────────────────────────────┴─────────────┴────────────┴───────────────────────────┴────────────────────┘

Except that the Vulnerabilities column will have 1/10/118/51/274/22 as values in the terminal using colors to indicate severity, being highest to lesser, left to right.

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:

Metadata

Release files for awsecr 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awsecr 0.5.1
File Size Uploaded
awsecr-0.5.1.tar.gz 25.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awsecr 0.5.1
File Interpreter ABI Platform
awsecr-0.5.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 47.4 kB

Release files / awsecr-0.5.1.tar.gz

Download URL awsecr-0.5.1.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8056b11112f5da7d1e59fcb6d9aaff6c4f90f52e19bc4692c46185d4ea0dbd70
BLAKE2b-256 checksum
How to use checksums
d00688be602b1e2851ed6ac975cdf5f7283c2159d4de63e4e71ce5624da57c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release files / awsecr-0.5.1-py2.py3-none-any.whl

Download URL awsecr-0.5.1-py2.py3-none-any.whl
Size 21.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d687d2af1bf7c0d9e01f6d56a96c3c7112ab78b0880554ad3ba0003042f7cc31
BLAKE2b-256 checksum
How to use checksums
1de4bbc0c641ce2c332382c5b9ee5b096112ae2b6acd12649a1f6218fd92962d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.4

Release history Release notifications | RSS feed

0.5.5

2 release files

0.5.3

2 release files

0.5.2

2 release files

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page