Browser based S3 POST upload on sites that I don't control

0

I notice Amazon offers a S3 Object Lambda for GET requests to support customisation of requested S3 objects to avoid letting clients download the original S3 object.

Is there a anything that supports POST requests which would let you to allow/reject a browser based upload using your own custom code?

The reason for wanting this is to allow third-party websites to make authenticated browser based POST requests to a specific bucket with custom non-aws credentials which I could then validate before allowing those files to go to S3. This will mean my customers get to have browser based S3 POST uploads on their own sites without having to have AWS credentials.

asked 10 months ago233 views
2 Answers
0

Would be possible to front the S3 bucket with an API Gateway? Then you could associated authorization with custom Lambda authorizer satisfying your custom requirements.

Resources:

profile picture
EXPERT
answered 10 months ago
0

How about using EC2 or ECS to create a system that will run an S3 PutObject when a file is uploaded?
With this, I think it is possible to upload without worrying so much about payload restrictions.
User authentication can be easily configured using Amazon Cognito or other means.
Frankly, I feel this is the easiest way to do it.
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/s3-example-photo-album.html

profile picture
EXPERT
answered 10 months ago
  • Application load balancers have a 100mb payload limit for HTTP targets. I feel the only way is to use a tcp target and terminate SSL inside the app instead of ALB.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions