Closed efenderbosch closed 7 years ago
Good point Eric. So I just need to do something like the following?
AWSCredentials awsCredentials;
if (accessKey == null) {
awsCredentials = new DefaultAWSCredentialsProviderChain().getCredentials();
} else {
awsCredentials = new BasicAWSCredentials(accessKey, secretKey);
}
Ok fixed. Seems to work. Thanks again for the suggestion. v1.1 released.
I'm just looking at several of the Logback appenders for CloudWatch and noticed you require that the key and secret be in
logback.xml
and useBasicAWSCredentials
. If you switched toDefaultAWSCredentialsProviderChain
then users could inject their credentials several different ways (env var, sys props, .aws/credentials, ec2 container creds) w/o having to check them in their VCS.