1001Ferramentas
☁️Dev

AWS SigV4 Canonical Request Preview

Build the Signature Version 4 canonical request from method, URI, query string, host and x-amz-date to debug 403 SignatureDoesNotMatch errors.

Canonical Request

The canonical request behind an AWS signature

AWS Signature Version 4 does not sign the request directly: it first assembles a canonical form, a text holding the method, path, parameters, headers and body digest in a fixed order and format. That text is what goes into the calculation. When a signature does not match, the problem is almost always in building that canonical form rather than in the cryptography.

Fill in the fields and the page shows the resulting canonical text. It is for comparing against what your library produces — AWS reports the canonical form it computed inside the invalid-signature error message, and comparing the two line by line locates the divergence in seconds.

Worth being clear about scope: this is a preview of the structure, with fixed signed headers and the body declared as unsigned. The complete canonical form requires normalising the path, encoding each parameter under its own rules, sorting parameters by name and headers by lowercase name, and collapsing whitespace in values. Those normalisation steps are precisely where hand-rolled implementations go wrong.

Frequently asked questions

Why does my signature not match?
Most often ordering or encoding. Parameters must be sorted by name, with name and value encoded; signed headers go lowercase and sorted, with internal whitespace collapsed. The AWS error message carries the expected canonical form — comparing is the fastest route.
What is the unsigned payload?
A special value used in place of the body digest when you do not want to hash the content, permitted for uploads to object storage over HTTPS. Outside that case the correct value is the body digest, and an empty body has a specific well-known digest.
Does the order of signed headers matter?
It matters a great deal: the list must be alphabetical, lowercase, semicolon-separated, and must correspond exactly to the headers appearing in the block above it. A mismatch between the list and the block is one of the commonest causes of an invalid signature.

Related Tools