- Newest
- Most votes
- Most comments
Making sure I'm answering the correct question here:
You want to create a presigned URL so that you can upload an object to S3. The page you've linked to is for downloading an object (although the operations are very similar).
Note that you can't use a presigned URL for one action (say, download - a GET action) and use it to upload (a PUT or POST action). Presigned URLs are specifically for one action and one object only - in a specific bucket.
When you sign the URL it will contain a set of parameters: The bucket name; the action; the object name; and optional other parameters such as the content type. It's mandatory that the call that you make to S3 using the presigned URL have exactly those parameters and none different otherwise it won't work.
In order to troubleshoot this specific question further, you'd need to supply the action you're trying to take and the error message. Don't paste the presigned URL into this forum as it is public - you don't want anyone misusing it.
There are two things to note. One is that now S3 objects have the block public access setting on by default. You will need to uncheck block public access and apply a bucket policy to the bucket to allow public access. - https://repost.aws/knowledge-center/read-access-objects-s3-bucket
The second thing to note is that the presigned URL has the same exact permissions as the role that generated it. A quirk is you can actually create a URL for an object you do not have access to and subsequently the URL will not provide access even though you can create it. Ensure the role that is used to generate the URL has access and is from an account that owns the bucket. I have included some other links below.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/troubleshoot-403-errors.html
Relevant content
- asked 6 months ago
- asked 7 months ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago