AWS SNS Verifier
Project description
AWS SNS Verifier
A Python library for verifying AWS SNS signatures based on the official AWS documentation.
Features
- Validates SNS message signatures (SHA1 and SHA256)
- Supports notification and subscription confirmation messages
- Email attachment extraction from SNS messages
- Type-safe Pydantic models
- Certificate validation and caching
Installation
uv add aws-sns-verifier
Usage
from aws_sns_verifier.validator import validate_sns_signature
from aws_sns_verifier.models import EmailWebhookRequest
# Parse your SNS message
sns_message = EmailWebhookRequest(**sns_json_data)
# Verify the signature
validate_sns_signature(sns_message, expected_topic_arn="arn:aws:sns:...")
## Publish
#.env
UV_PUBLISH_TOKEN=pypi-...
# export all envs in .env to the terminal
export $(cat .env | xargs)
uv build && uv publish
Dependencies
- Python 3.13+
cryptography>=45.0.5pydantic>=2.11.7
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aws_sns_verifier-0.1.3.tar.gz
(23.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_sns_verifier-0.1.3.tar.gz.
File metadata
- Download URL: aws_sns_verifier-0.1.3.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b81c0335f4396d13e0b0ded0b14b1fc25299279692286fd17f2f4b7da1dbda5
|
|
| MD5 |
c9c87be106536d10bb94c00d6feaf208
|
|
| BLAKE2b-256 |
02ade23a5c2c54a8685fd874f4a16259ae2487b4f013bb06529d5f7e6ea810ce
|
File details
Details for the file aws_sns_verifier-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aws_sns_verifier-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f48e9725b3ea63fabfdc7e0e67d4cfb0ee50aaf3f773ac8821007181d6b139a1
|
|
| MD5 |
725d2f2accae08d22f4dd6e276d080f7
|
|
| BLAKE2b-256 |
4d52a075173d16a9ade48fd5b3473c622e69868272616b5d9445b7f1a31e127b
|