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.5

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.5
File Size Uploaded Provenance Actions
awsecr-0.5.5.tar.gz 25.7 kB Without provenance Details for awsecr-0.5.5.tar.gz

Built distribution (wheel)

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

Total release size: 47.5 kB

Release files / awsecr-0.5.5.tar.gz

Download URL awsecr-0.5.5.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7b38165545236ce00a94ef5af717c9bebae17ee5b0aa8caf69d68f382dc33ac7
BLAKE2b-256 checksum
How to use checksums
6de1d956e801b5b749498567debd0aa7398cd0cbe526f88ab06aae42aad4ce1a
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.5-py2.py3-none-any.whl

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

Security for awsecr 0.5.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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