Registry / aws / aws-sns-message-validator

aws-sns-message-validator

JSON →
library0.0.5pypypi✓ verified 80d ago

A Python library for validating AWS SNS messages, including signature verification using AWS's public certificates. Version 0.0.5, last updated in 2020. Low release cadence.

pip install aws-sns-message-validator
INSTALL
IMPORT
SIG · AWS-SNS-MESSAGE-VA
A
aws-sns-message-validator
awspythonv0.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

SNSMessageValidator
from sns_message_validator import SNSMessageValidator
from aws_sns_message_validator import SNSMessageValidator

Validate an AWS SNS message by passing the full JSON message string.

import json from aws_sns_message_validator import SNSMessageValidator validator = SNSMessageValidator() message = { 'Type': 'Notification', 'MessageId': '...', 'TopicArn': '...', 'Subject': '...', 'Message': '...', 'Timestamp': '...', 'SignatureVersion': '1', 'Signature': '...', 'SigningCertURL': '...', 'UnsubscribeURL': '...' } result = validator.validate_message(json.dumps(message)) print(result)
Debug
Known issues
gotchaThe validate_message method expects a JSON string, not a dict. Passing a dict will cause a TypeError.
fix
Always json.dumps() your dict before calling validate_message.
affects: all
gotchaCertificate URL must be HTTPS and point to a valid AWS certificate. The library does not validate the URL beyond downloading it.
fix
Ensure the SigningCertURL is always an AWS https URL (e.g., https://sns.us-east-1.amazonaws.com/...).
affects: all
deprecatedThe library uses md5 which is deprecated; some Python environments may raise warnings.
fix
Ignore warnings or use a different library like 'aws-encryption-sdk' for strict compliance.
affects: 0.0.5
Upgrade
Version history
0.0.5latest on PyPI · released Feb 15, 2022
Audit
Dependencies
cryptographyrequiredRequired for certificate and signature handling
requestsrequiredUsed to download AWS certificates
Agent activity
23 hits · last 30 days
node
18
OpenAI (training)
1
Resources
aws-sns-message-validator — pip install aws-sns-message-validator · libregistry