S3 pre-signed url - check if url was used?

拟墨画扇 提交于 2020-01-07 05:12:05

问题


I'm using S3 pre-signed url for uploading images directly from client-side. I would like to be able to push a message to SQS queue only when I'm sure that the url was used and a new image was uploaded.

Given a pre-signed url, how can I validate if it was used?


回答1:


Do you really need to know when a pre-signed URL has been used? Or can you just send a new message to SQS whenever a new object is uploaded to your S3 bucket? Since you are restricting uploads to using pre-signed URLs wouldn't that accomplish your goal?

S3 has built-in support for sending a notification to SQS, SNS or Lambda whenever a new object is created. You can read more about that here: http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-event-types-and-destinations



来源:https://stackoverflow.com/questions/36825127/s3-pre-signed-url-check-if-url-was-used

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!