
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
aws-sns-message-validator
Advanced tools
PyPI: https://pypi.org/project/aws-sns-message-validator/
An HTTP endpoint for AWS SNS needs to validate the received messages before processing them which involves some non-trivial logic, especially signature verification. In terms of implementation, AWS does not offer any help with SNS message validation in their SDK for Python (issue) nor does it provide example code in the documentation (example code is only available in Java). Therefore Python developers would need to invent their own wheels.
To solve this problem, this repository offers an SNS message validator which is implemented according to the guide on the official AWS documentation, and offers example code of how to use it to implement an HTTP endpoint for SNS.
pip install aws-sns-message-validator
Refer to the example code flask_example.py
to see how to use this package in your SNS http endpoint. In order to quickly try out the example code, follow the steps below:
python3 -m pip install -r requirements.txt
FLASK_APP=flask_example.py flask run --port=5000
to start an http server.ngrok
to expose the local server to the public internet (./ngrok http -bind-tls=true localhost:5000
). Now you should get a public endpoint (https://xxxxxxxx.ngrok.io
) that can be set as a subscriber of an SNS topic.Feel free to create an issue if you found a bug or have a feature request.
FAQs
Validator for AWS SNS messages.
We found that aws-sns-message-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.