Quantcast
Viewing all articles
Browse latest Browse all 73

Triggering a SNS notification when an object is accessed (downloaded) in AWS S3

I have managed to trigger events on my bucket when objects are uploaded (PUT) but I am surprised that there are no triggers called when objects are downloaded (GETs), as can be seen in this screenshot of the interface:

Image may be NSFW.
Clik here to view.
enter image description here

I want to be notified of each download so I will be able to limit the downloads of any given object to a maximum of 10 times.

How to do that?

I am aiming at setting a tag named for example limit_reached, value: true on the file object if the download limit is reached and returning 403 by conditional access policy based on the limit_reached tag.

Alternative to all this, is to generate signed url's by my web application and track how many signed urls have been generated for a given object and denying any further after generating signed urls 10 times.

Your ideas are highly appreciated.


Viewing all articles
Browse latest Browse all 73

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>