Support AWS IAM role for S3
Created by: pgmillon
Feature request description
Using AWS S3 for storing LSIF data requires AWS credentials to be added as environment variables. If Sourcegraph is running on an EC2 instance with an IAM role attached and a policy granting access to S3, the credentials are useless. It's a security best practice to rotate credentials if any, when using IAM roles & policies there's no credentials to rotate anymore. I tried setting up Sourcegraph without AWS credentials but I guess it's hard-coded within the core to read those values to connect to AWS API. I need to be able to run Sourcegraph on AWS without setting AWS API credentials. Rotating the keys will be painful since I'll have to update Sourcegraph deployment regularly with the new keys.
Describe alternatives you've considered.
An alternative would be to run on Kubernetes, but that's no possible yet.