aws-http-auth
Lightweight AWS SigV4 signing and HTTP authentication for httpx, requests, and raw HTTP clients—without the weight of boto3.
Features
- 🚀 Lightweight: No heavy dependencies like boto3—just pure AWS SigV4 signing
- 🔗 Universal: Works with
requests,httpx, and any HTTP client that supports auth handlers - 🔑 Flexible credentials: Load from AWS credentials file, environment variables, or provide directly
- 🎯 Zero config: Automatically detects AWS regions and services from URLs
- 🌐 Pyodide compatible: Works in browser environments with WebAssembly
- 📦 Type safe: Full type hints for better development experience
Table of Contents
Installation
pip install aws-http-auth
Usage Examples
Using requests
from aws_http_auth.credentials import AWSCredentials
from aws_http_auth.http_auth import AWSV4SignerAuth
import requests
creds = AWSCredentials.from_ini_file("~/.aws/credentials")
auth = AWSV4SignerAuth(credentials=creds)
session = requests.Session()
session.auth = auth
response = session.request(
method="POST",
url="https://secretsmanager.us-east-1.amazonaws.com/",
json={
"SecretId": "MyTestDatabaseSecret",
},
headers={
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "secretsmanager.GetSecretValue",
},
)
Using httpx
from aws_http_auth.credentials import AWSCredentials
from aws_http_auth.http_auth import AWSV4SignerAuth
import httpx
creds = AWSCredentials.from_ini_file()
auth = AWSV4SignerAuth(credentials=creds)
async with httpx.AsyncClient(auth=auth) as client:
response = await client.post(
"https://secretsmanager.us-east-1.amazonaws.com/",
json={
"SecretId": "MyTestDatabaseSecret",
},
headers={
"Content-Type": "application/x-amz-json-1.1",
"X-Amz-Target": "secretsmanager.GetSecretValue",
},
)
Profile Selection
- If no profile is specified, the library uses the
AWS_PROFILEenvironment variable - If only one profile exists in the credentials file, it's used automatically
- If multiple profiles exist and none is specified, an error is raised
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
aws-http-auth is distributed under the terms of the MIT license.
Metadata
Release files for aws-http-auth 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aws_http_auth-0.0.2.tar.gz | 12.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_http_auth-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / aws_http_auth-0.0.2.tar.gz
| Download URL | aws_http_auth-0.0.2.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a9fb6d25606e5fbe052a99a31160b9ae66291ae0face06f843557257330c71c
|
|
BLAKE2b-256 checksum How to use checksums |
87f0c3935fa9bdcdcc95150ffad63f0ee3ee7837e8d2040b21bdb145a7b7be75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2025.
Transparency logRelease files / aws_http_auth-0.0.2-py3-none-any.whl
| Download URL | aws_http_auth-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aa013c7f54c5063a4098d7b8ee337a867a9cbe6156425b1370c496bda0f81da
|
|
BLAKE2b-256 checksum How to use checksums |
33d08e983a15ddd2ce44c711b1b939e9e56dba5cea48ef1005837f7834b8cf13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2025.
Transparency logSecurity for aws-http-auth 0.0.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aws_http_auth-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2025.
Transparency logA 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.