Skip to main content

Wrapper for dockerized AWS CLI v2

Project description

AWS CLI v2

PyPI - awscliv2 PyPI - Python Version

Wrapper for dockerized AWS CLI v2. Uses amazon/aws-cli Docker image.

Installation

Install Docker.

pip install awscliv2

You can add an alias to your ~/.bashrc or /zshrc to use it as a regular AWS CLI v2

alias aws='awsv2'

Usage

Container uses two volumes:

  • $HOME/.aws -> /root/.aws
  • $(cwd) -> /aws

Pull latest amazon/aws-cli image:

awsv2 --update

Configure default frofile if needed:

AWS_ACCESS_KEY_ID='my-access-key'
AWS_SECRET_ACCESS_KEY='my-secret-key'

# --configure profile_name access_key secret_key
awsv2 --configure default ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY}
awsv2 configure set region us-west-1

Use awscli as usual:

# alias for
# docker run --rm -i -v ~/.aws:/root/.aws -v $(pwd):/aws amazon/aws-cli $@
awsv2 s3 ls

# or as a python module
python -m awscliv2 s3 ls

Also, you can check example.sh

Versioning

awscliv2 version follows PEP 440.

Latest changes

Full changelog can be found in Changelog. Release notes can be found in Releases.

Change Log

All notable changes to this project are documented on Releases page.

The format is based on Keep a Changelog and this project adheres to PEP 440.

[Released]

[1.3.1] - 2020-09-02

Fixed

  • Error if $HOME/.aws path does not exist

[1.3.0] - 2020-09-02

Added

  • awsv2 --assume-role <name> <source_profile> <role_arn> command

Fixed

  • Files in .aws folder belonged to root user if they were created by awsv2

[1.2.0] - 2020-08-30

Added

  • Support for interactive commands like awsv2 configure

Changed

  • Instructions output how to install docker if it was not found

Fixed

  • Error while running in non-TTY environment
  • Error caused by keyboard interrupt
  • -U/--update command did not return correct exit code

[1.1.0] - 2020-08-29

Added

  • -U/--update CLI argument to pull latest amazon/aws-cli image

Changed

  • -V/--version command shows underlying image version
  • region_name removed from --configure command

[1.0.0] - 2020-08-29

Initial release

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awscliv2-1.3.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file awscliv2-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: awscliv2-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for awscliv2-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fadd987b610e9d3d5e7ce36283e01b306f294f4b7cfa7c2b7da43a27cd65bedb
MD5 f95a326ae90db9fc7624523e878c193a
BLAKE2b-256 3e88d44e9af1dee7787caa1c4b99fe6678e8925aee6bd0a9614abaaaa29ccf3d

See more details on using hashes here.

Supported by

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