A Skelton On-Prem AWS-SNS receiver (for StorageGRID) Also Available as a docker container
$ docker run -p <your-local-port>:8080 vardhanv/onprem-sns:latest
- Create a server using ubuntu on AWS preferably use ami-b5ed9ccd
- Make sure you "ssh-add" your pem file, so ssh, scp etc work
- Open inbound port 80 into your ec2 server
- Note the public dns name of your server
- Execute the following
$ git clone https://github.com/vardhanv/onprem-sns.git
$ cd onprem-sns
$ ./prepare-app <ec2-public-dns-name>
$ ./deploy-app <ec2-public-dns-name>
$ ssh <ec2-public-dns-name>
$ cd not
$ sudo nodejs index.js
On-prem Notifications is ready on port: 80
- Your On-Prem AWS SNS Receiver is now ready. You can test reachability by
$ curl http://<ec2-public-dns-name>
- Let's configure StorageGRID
- Go to your tenant page on StorageGRID
- Create an endpoint with the following values, and click save
Display Name: S3 Notifications
URI: http://<ec2-public-dns-name>
URN: urn:mytext:sns:us-east::my_topic
Access Key: <blank>
Secret Key: <blank>
Certificate Validation: <Do not verify>
-
You should see a test message on your SNS endpoint
-
Go to the bucket for which you want to configure notifications
-
Enter the following xml string, and click save
<NotificationConfiguration>
<TopicConfiguration>
<Id>Object-Event</Id>
<Topic>urn:mytext:sns:us-east::my_topic</Topic>
<Event>s3:ObjectCreated:*</Event>
<Event>s3:ObjectRemoved:*</Event>
</TopicConfiguration>
</NotificationConfiguration>
-
Put or delete objects into your bucket. You should see notifications appear on your on-prem SNS receiver
-
If you find issues, report them via github
-
Have fun, and send me $10 on my paypal account :)