Registry / aws / aws-request-signer

aws-request-signer

JSON →
library1.2.0pypypi✓ verified 83d ago

A Python library to sign AWS requests using AWS Signature V4. Current version is 1.2.0, with a stable release cadence. Supports Python 3.6+ and aims to simplify request signing for AWS services.

pip install aws-request-signer
INSTALL
IMPORT
SIG · AWS-REQUEST-SIGNER
A
aws-request-signer
awspythonv1.2.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AwsRequestSigner
from aws_request_signer import AwsRequestSigner
from aws_request_signer import AWSRequestSigner

Initialize signer with credentials, region, and service; then sign a request to obtain signed headers.

import os from aws_request_signer import AWSRequestSigner # Set your credentials via environment variables access_key = os.environ.get('AWS_ACCESS_KEY_ID', '') secret_key = os.environ.get('AWS_SECRET_ACCESS_KEY', '') region = 'us-east-1' service = 'execute-api' signer = AWSRequestSigner(access_key, secret_key, region, service) # Example GET request method = 'GET' url = 'https://example.com/dev' headers = {} body = '' signed_headers = signer.sign(method, url, headers, body) print(signed_headers)
Debug
Known issues
gotchaThe signer does NOT verify endpoint URLs or credentials at initialization; invalid params only fail at signing time.
fix
Ensure credentials and region are correct before calling sign() to avoid opaque errors.
affects: all
deprecatedThe library does not support AWS Signature V4A or temporary credentials from STS automatically; you must supply temp creds manually.
fix
If using temporary credentials (session token), include it as a custom header or use a different library that supports session tokens natively.
affects: all
Upgrade
Version history
1.2.0latest on PyPI · released Feb 20, 2023
Audit
Dependencies
requestsrequiredUsed as the base library for signing HTTP requests
sixrequiredPython 2/3 compatibility layer
Agent activity
28 hits · last 30 days
node
22
OpenAI (training)
2
Resources