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

2019-09-02 04:00发布

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条回答
放我归山
2楼-- · 2019-09-02 04:34

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

查看更多
登录 后发表回答