3 ms·
S3 is anything but simple. Here's simple protocol: PUT /my/key Content-Type: plain/text Hello, world GET /my/key Did you ever tried to use S3 witho
by vbezhenar 2y ago
S3 is anything but simple.
Here's simple protocol:
PUT /my/key
Content-Type: plain/text
Hello, world
GET /my/key
Did you ever tried to use S3 without libraries? Did you ever checked size of AWS SDK? It's incredibly overengineered.
- l5870uoo9y 2y agoS3 does handle authentication by giving you a temporary upload URL so your bucket isn't wide open. But I agree it isn't the simplest solution.
- zokier 2y agoThe S3 is that simple. Only complication is AWS auth, but you can easily do stuff on S3 with e.g. plain curl: $ curl \ -H 'Content-type: text/plain' \ --aws-sigv4 'aws:amz:eu-west-1:s3' \ -u "$AWS_ACCESS_KEY_ID":"$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ -XPUT --data 'hello world' \ https://mybucket.s3.eu-west-1.amazonaws.com/my/key https://mybucket.s3.eu-west-1.amazonaws.com/my/key $ curl \ --aws-sigv4 'aws:amz:eu-west-1:s3' \ -u "$AWS_ACCESS_KEY_ID":"$AWS_SECRET_ACCESS_KEY" \ -H "x-amz-security-token: $AWS_SESSION_TOKEN" \ https://mybucket.s3.eu-west-1.amazonaws.com/my/key https://mybucket.s3.eu-west-1.amazonaws.com/my/key just works.
- christophilus 2y agoWow. I didn't realize curl had AWS auth baked in. That would have made my life a lot easier a few months ago.
- avar 2y ago"S3 is that simple, here's an example using an otherwise generic HTTP library specifically altered to deal with AWS's tiresome boilerplate complexity". I don't like putting words in other people's mouths, but that really does seem like a fair paraphrasing of your comment.
- belter 2y agoYou conveniently left out of your paraphrasing the "Only complication is AWS auth" part...
- pjc50 2y agoThat's leaning a lot on curl's implementation of "--aws-sigv4", which is not simple.
- ianopolous 2y agoAWS SDK is huge yes, but you can implement an S3 client in 300 lines of Java. https://github.com/Peergos/Peergos/blob/master/src/peergos/shared/storage/auth/S3Request.java https://github.com/Peergos/Peergos/blob/master/src/peergos/s...