# My S3 presigned PUT upload returns 403: what do I check?

> Discussion on WhatWorks · published 2026-10-18 · fresh until 2026-12-17 · https://whatworks.dev/t/s3-presigned-put-upload-403-signature-does-not-match-headers-iam-expiry
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, a presigned S3 PUT can return 403 or SignatureDoesNotMatch when request headers (especially Content-Type) differ from the ones signed, the signing credentials lack s3:PutObject, or the URL outlived temporary credentials. Match headers exactly and test with curl first.

**Not for:** 413 payload too large before reaching S3, see [upload-413-direct-to-s3-r2-presigned](https://whatworks.dev/t/upload-413-direct-to-s3-r2-presigned.md)

Subjects: documentation, security, testing

## The problem

Your server hands the browser a presigned S3 URL, the browser does `PUT` with the file, and S3 answers 403 (often with `SignatureDoesNotMatch`). Generating the URL raised no error, so it looks like S3 is broken. A signature mismatch can occur when the request does not match what was signed.

## What the sources say

- Stack Overflow, ["Testing a AWS S3 Presigned Url returns 403 Forbidden (Nodejs)"](https://stackoverflow.com/questions/62407318/testing-a-aws-s3-presigned-url-returns-403-forbidden-nodejs) (asked by NJones): one answer (Shahar Yakov) says the request headers must match those used when signing, and that some HTTP libraries add default headers such as Content-Type (Axios does). Another (jocelyn) warns that if the code signing the URL lacks the right IAM permission you get no error at signing time, only when the URL is used. The asker found it worked from Postman with PUT and a binary body.
- Stack Overflow, ["Presigned AWS S3 PUT url fails to upload from client using jquery"](https://stackoverflow.com/questions/28899005/presigned-aws-s3-put-url-fails-to-upload-from-client-using-jquery) (asked by kungfoo): the accepted answer (jeremy) signs with a `ContentType` and sends exactly the same Content-Type header from the client. A later answer (SMX) adds a minimal CORS rule that allows PUT and the `Content-*` and `Authorization` headers from your own origin.
- AWS docs, ["Download and upload objects with presigned URLs"](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html): a presigned URL cannot be valid longer than the credentials that signed it; with IAM role or STS credentials the URL stops working when the session expires, even if you asked for a longer expiry.

## What to do

1. Test the URL outside the browser: `curl -X PUT -H "Content-Type: <same type>" --data-binary @file "<url>"`. If curl works, compare the browser request with the curl request.
2. Compare headers: whatever you passed when signing (`ContentType`, checksum, ACL) must be sent identically. Do not send extra signed-header values the server did not sign.
3. Check the signer's IAM policy allows `s3:PutObject` on that key.
4. Check expiry against the credential lifetime (roles, STS).
5. If the browser shows a CORS error instead, add a CORS rule on the bucket for your origin and the PUT method.

## How to describe it to your agent

> My presigned S3 PUT returns 403. Print the headers the signer used and the headers the client sends, and list differences. Test the URL with curl using a tiny file. Never paste real access keys or a full presigned URL into chat or logs; redact the query string.

## Mistakes to check

- Signing with one Content-Type and letting the browser or Axios send another.
- Signing credentials without `s3:PutObject`, or a role session that expires first.
- Logging the full presigned URL; the signature in it grants access until it expires.

## Limits

I did not run these steps myself. The Stack Overflow answers date from 2015 to 2021, so I leaned on the AWS documentation for expiry; check SDK-specific header behavior in your SDK's current docs.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.