awscliv2
Wrapper for AWS CLI v2
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 awscliv2uv
uv add awscliv2poetry
poetry add awscliv2Installing 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
awscliProvides a unified command-line interface to…
permissive · top 1,000 on PyPI
awsiotCommand-line tool for provisioning AWS IoT…
permissive · top 15,000 on PyPI
awscli-localProvides the `awslocal` command, a thin wrapper…
permissive · top 5,000 on PyPI
yawssoSyncs AWS CLI v2 SSO login sessions into legacy…
permissive · top 15,000 on PyPI
awscurlA curl-like command-line tool that…
permissive · top 15,000 on PyPI
awsCommand-line tool to manage Amazon EC2 and ELB…
permissive · top 15,000 on PyPI
aws-requests-authAdds AWS Signature Version 4 authentication to…
permissive · top 1,000 on PyPI
pulumi-awsPulumi AWS provider for Python that lets you…
permissive · top 5,000 on PyPI
botocoreBotocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aws-assume-role-libSimplifies AWS role assumption in boto3 by…
permissive · top 15,000 on PyPI