问题
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