classmethod / gradle-aws-plugin

Gradle plugin to manage Amazon Web Services
276 stars 131 forks source link

Make possible to use without credentials file or explicit profile name #174

Open dead10ck opened 5 years ago

dead10ck commented 5 years ago

It's not clear from the README, but it would be nice if this plugin followed the same steps for authentication that the AWS CLI and the boto libraries use for authentication.

Currently, the plugin implies that the ~/.aws/credentials file must exist. Following the same behavior as AWS' standard tools and libraries, the profile name should come from the AWS_PROFILE environment variable; if the variable is not set, it should just default to default.

Similarly, if you are running this build in EC2, if there is no ~/.aws/credentials file, it should be aware that it is running in an EC2 instance and fetch the instance's IAM credentials from its assigned profile.