Registry / aws / amazon-sns-extended-client

amazon-sns-extended-client

JSON →
library1.0.1pypypi✓ verified 83d ago

Python version of AWS SNS extended client that enables publishing large payload messages (>256KB) via Amazon S3. Current version 1.0.1, release cadence is low (latest release Jan 2022).

pip install amazon-sns-extended-client
INSTALL
IMPORT
SIG · AMAZON-SNS-EXTENDE
A
amazon-sns-extended-client
awspythonv1.0.1
Install
3.9s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · 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 · 50.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.000s · 51MB
49MB installed
● package 49MB
Code
Verified usage

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

SNSExtendedClientSession
from sns_extended_client import SNSExtendedClientSession
from amazon_sns_extended_client import SNSExtendedClient

Initialize the extended client with SNS and S3 clients and a bucket for payload storage.

import boto3 from amazon_sns_extended_client import SNSExtendedClient topic_arn = os.environ.get('TOPIC_ARN', 'arn:aws:sns:us-east-1:123456789012:MyTopic') bucket_name = os.environ.get('BUCKET_NAME', 'my-sns-payload-bucket') sns_client = boto3.client('sns') s3_client = boto3.client('s3') extended_client = SNSExtendedClient(sns_client, s3_client, bucket_name) response = extended_client.publish( TopicArn=topic_arn, Message='This is a large message that exceeds the 256KB limit if long enough...' * 1000 ) print(response)
Debug
Known issues
breakingThe library does NOT support FIFO topics - messages are published without message group/deduplication IDs. Attempting to use FIFO topic will cause error.
fix
Use standard SNS topics only, or manually implement ordering/deduplication.
affects: >=1.0.0
gotchaPayloads are uploaded to S3 as individual objects (one per message). This incurs S3 storage and request costs even for small messages if always routed through extended client.
fix
Use SNSMessageSizeChecker to conditionally skip S3 for messages under 256KB.
affects: all
deprecatedThe library currently uses the legacy 'PayloadSizeThreshold' parameter in configuration; newer AWS SDK versions may deprecate the client object signature.
fix
Check AWS SDK compatibility; if needed, use AWS SDK v2 or higher with updated config.
affects: 1.0.1
gotchaThe S3 bucket must be in the same region as the SNS topic, otherwise publish will fail with cross-region access errors.
fix
Ensure bucket and topic are in the same AWS region.
affects: all
Upgrade
Version history
1.0.1latest on PyPI · released Feb 18, 2025
Audit
Dependencies
boto3requiredAWS SDK for Python required for SNS and S3 operations
aws-encryption-sdkoptionalOptional dependency for payload encryption
Agent activity
37 hits · last 30 days
node
30
OpenAI (training)
2
Perplexity
1
Resources
amazon-sns-extended-client — pip install amazon-sns-extended-client · libregistry