I want to save all SNS messages to S3 so I can keep a complete history. The purpose is to have the ability to go look back when diagnosing and issue, later index and use this to audit, replay, rebuild data, etc. For now, I just want to dump them into S3 (cheap) and later I'll dig into it when needed.
Can I use AWS provided integrations to accomplish this or do I need to write my own HTTP service or Lambda?
I'd rather not have to write and maintain a lambda or service if I can avoid it.
What I've seen so far is that I can set an HTTP endpoint as an SNS subscriber but it has a different message format than the S3 http api thus requiring a lambda to transform it. Also the initial subscriber confirmation message. Is this not possible and I should get to work on my own service/lambda?
SNS : No persistence. Whichever consumer is present at the time of message arrival, get the message and the message is deleted. If no consumers available then the message is lost.
I've used SNS notifications triggered by S3 bucket whenever an object is put on a particular folder in S3. You can follow the below steps to achieve the same: Step 1: Create an Amazon SNS topic for the Email Notifications: First of all, create an Amazon SNS topic which publishes notifications to email.
You can configure the Amazon SQS message retention period to a value from 1 minute to 14 days. The default is 4 days. Once the message retention quota is reached, your messages are automatically deleted.
Sends notifications from S3 to SQS when an object is created. This SAM template creates an S3 bucket and SQS queue. S3 writes a messages to the SQS queue when a new object is put into the bucket.
As far as I know this isn't possible.
It would be pretty trivial to write a lambda which can persist your SNS or SQS messages.
You can also use something like sqs-s3-logger (note this code is based on the fact you couldn't trigger a Lambda from SQS, this is possible now so you don't need a cron job)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With