gaul / s3proxy

Access other storage backends via the S3 API
Apache License 2.0
1.75k stars 228 forks source link

aws-s3 provider: authenticating automatically using ec2 instance roles #491

Open SrslyJosh opened 1 year ago

SrslyJosh commented 1 year ago

Hi,

When running s3proxy in an ec2 instance, is it possible to have s3proxy automatically retrieve credentials using the instance's IAM roles?

This is how the aws CLI functions when running in an EC2 instance, and I was hoping that s3proxy would be able to do the same. I've poked around in the documentation and source code for jclouds, but I haven't been able to find an answer.

Thanks!

alifirat commented 1 year ago

I have the exact same use case 🙂 If someone can share a workaround 🙏

nicewrld commented 1 year ago

I was also looking for the same... haven't found anything yet.

alifirat commented 1 year ago

Since the project is using jcloud internally, you don't have so much to do. Maybe a latest version is supporting it ?

nicewrld commented 1 year ago

I don't really have java experience or much time to write that currently... I'm running this in Kubernetes and am trying to implement a transparent no-auth proxy for some data, so I just wrote a shell script harness that gets temporary credentials and runs it until the creds expire then exits the app... since it's on k8s it'll restart

it's dirty, but it works for my uses for now

alifirat commented 1 year ago

So you're running s3proxy ? Do you mind to share your s3 proxy configuration ?