aws-sns-verify: Parse and verify AWS SNS messages

[ amazon, aws, cloud, cryptography, distributed-computing, library, mit, network, web ] [ Propose Tags ]


Manual Flags


Configure of testing


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,
Change log
Dependencies aeson (>=, base (>=4.7 && <5), bytestring (>=, crypton-x509, crypton-x509-validation, errors (>=2.3.0), http-conduit (>=2.3.2), memory (>=0.14.18), network-uri (>=, pem (>=0.2.4), regex-tdfa (>=, text (>= [details]
License MIT
Copyright 2022 Freckle By Renaissance
Author Freckle
Revised Revision 1 made by PatrickBrisbin at 2023-10-05T14:47:19Z
Category Network, Web, AWS, Amazon, Cloud, Cryptography, Distributed-Computing
Home page
Bug tracker
Source repo head: git clone
Uploaded by PatrickBrisbin at 2023-07-26T16:28:57Z
Distributions LTSHaskell:, NixOS:, Stackage:
Downloads 291 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-07-26 [all 1 reports]

Readme for aws-sns-verify-

[back to package description]


Consumers utilizing SNS need to do 3 tasks:

  1. Parse the message JSON
  2. Validate signed signatures
  3. Handle subscriptions

This library encapsulates those actions.

myEchoWebhook :: MonadHandler m => m ()
myEchoWebhook = do
  message <- verifySNSMessage =<< requireInsecureJsonBody
  logDebugN message

Sign For Test

Signatures for testing are produced with the self signed certificate in this repository.

cat unsigned.txt | openssl dgst -sha1 -sign tests/key.pem | openssl base64

The certificate was produced with

openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tests/key.pem -out tests/cert.pem