Closed imperugo closed 5 years ago
@imperugo You could actually remove the code for the EnvironmentVariablesAWSCredentials
all together. The FallbackCredentialsFactory.GetCredentials()
implicitly fallsback with that.
Hi @ericgreenmix Just pushed an update.
@imperugo TwentyTwenty.Storage 2.10.0 is published to Nuget. Will probably be a minute before it gets indexed by them. Thanks for your contribution!
Thanks.
Superfast!
If you are hosting your application into AWS cloud (ECS, EC2 ...) you don't need to add the credentials in order to work with S3 because the permission is managed by IAM Roles (here more info https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
Right now the library work with this flow:
1) Profile 2) Key + Secret 3) Environment Variables
I've added another step (latest one) for IAM Role, so the new flow is this:
1) Profile 2) Key + Secret 3) Environment Variables 4) Fallback to CredentialFactory
Let me know if there is something you don't like or any doubt (personally I don't like the try/catch for the Environment variables but I didn't find a better solution).
Thanks