skillfed

awscliv2

Wrapper for AWS CLI v2

awscliv2 v2.3.1 599.3K downloads/30d#5,831 on PyPI37
Permissive license MIT DORMANT released

What it is and what it does

awscliv2 is a thin Python wrapper around AWS CLI v2 that lets you call AWS commands from Python without the dependency conflicts that plague the original awscli package. It can run AWS CLI commands either through native binaries on your system or fall back to a Docker container if binaries aren't available. The package provides both a command-line interface (the `awsv2` command) and a Python API (AWSAPI class) for programmatic access to AWS services.

The wrapper handles credential management, profile configuration, and role assumption through simple Python methods. It avoids the "dependency hell" of the original awscli by not bundling its own copy of AWS CLI dependencies—instead it wraps the standalone AWS CLI v2 binary. This makes it lighter and easier to integrate into existing Python projects, though it does require either the AWS CLI v2 binaries or Docker to be available on your system.

Use it for:

  • Automate AWS operations (S3 uploads, EC2 management) from Python scripts without managing awscli's complex dependencies
  • Set up AWS credentials and assume roles programmatically in CI/CD pipelines using the AWSAPI interface
  • Run AWS CLI commands from Python code with error handling via AWSCLIError exceptions
  • Use Docker as a fallback for AWS CLI access in containerized or restricted environments without native binary support

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a Python wrapper around AWS CLI v2, allowing you to run AWS CLI commands from Python code or the command line without managing the original awscli's dependency complexity.

Yes, if you need to call AWS CLI from Python and want to avoid awscli's dependency conflicts. The low install friction and permissive license make it a reasonable choice. However, the 709-day dormancy means no active maintenance—verify that it still works with your target AWS CLI v2 version and Python release before committing to production use. The Docker fallback is a useful safety net but adds a runtime dependency you should account for.

Install

awscliv2 on PyPI

pip

pip install awscliv2

uv

uv add awscliv2

poetry

poetry add awscliv2

Installing awscliv2

Before you install

Low install friction with just two runtime dependencies (importlib-metadata and pip). The package is marked Production/Stable but has been dormant for 709 days since its last release, so expect no active maintenance or bug fixes.

License in practice

MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install awscliv2

from awscliv2.api import AWSAPI

aws_api = AWSAPI()
output = aws_api.execute(["s3", "ls"])

Requires AWS CLI v2 binaries installed (via `awsv2 --install`) or Docker installed as a fallback; AWS credentials must be configured via environment variables or ~/.aws/credentials

Verify before relying

  • Whether Docker is required as a fallback when native binaries are not installed
  • Whether the package's AWS credentials handling has been audited for security
  • Current compatibility with the latest AWS CLI v2 releases

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — importlib-metadata, pip
Maintenance dormant — 709 days since the last release
Last repo commit
First released
Downloads 599,268/month — #5,831 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: awscliv2-2.3.1-py3-none-any.whl

Keywords: awscli, awscliv2, wrapper

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

aws cli v2 python wrapperaws command line interface pythonaws cli without dependency hellpython aws cli automationaws api python interfaceaws cli v2 bindingsaws credentials management python
aws-integrationcli-wrapperdevops

More Python Modules packages