Amazon S3 Upload

This example shows how to upload a file with a browser post to S3.

Script Code

This code creates an S3 policy and signs it with an S3 secret key.

After the file is successfully uploaded, the browser is redirected to the script below, which provides an HTML link to a query-string authenticated S3 URL.

Demo Code

Some of the form fields are populated by this JavaScript code, which calls the s3/policy script above:

Try It!