Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get "Access Denied" when an S3 presigned URL was successfully generated?

Generated a presigned URL to upload a file to an s3 bucket. Got status-code 403 with error message Access Denied when tried uploading with that presigned URL.

like image 778
dz902 Avatar asked Sep 15 '25 15:09

dz902


1 Answers

Note that presigned URLs are a URL format that embeds temporary tokens that is recognized by S3.

However, it is NOT an API call.

So when you call presign operation, you merely construct a URL that is signed with your current credentials. Only when the URL is used, will S3 use the credentials embedded to access an object.

So, check whether your signing party has access to the object before generating presigned URLs. Otherwise you get a URL that is correctly formed, without permissions to access the object and will end up with "Access Denied".

like image 140
dz902 Avatar answered Sep 18 '25 08:09

dz902