presigned post with policy document
Hey,
It's recommended to use presigned uploads with policy to enforce specific limits for stricter control over the uploaded files.
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html
It seems like this is not possible right now with the current provided API: https://async-aws.com/features/presign.html
Did I missed something? 🤔
An upload with a POST policy is not relying on a presigned request. It relies on a different feature (which exists only for S3, and only for uploading a file).
We don't currently offer an API allowing to sign the POST policy (or to construct it).
Looking at the official AWS SDK, they have a PostObjectV4 object allowing to build the input values needed for a policy-based upload. We could probably implement a similar feature in our async-aws/simple-s3 package (which is where we build features for S3 that go beyond the generated client). The exact shape of our API for that is still to be determined.