3 ms·
The 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' \
by zokier 2y ago
The 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.