guardian / kinesis-logback-appender

LOGBack Appender for writing data into a Kinesis Stream
Apache License 2.0
40 stars 25 forks source link

Updated to allow use for ECS (Still falls back to Instance profile) #27

Closed monkey-jeff closed 6 years ago

monkey-jeff commented 6 years ago

Hi this should fix issues #14

This will still work with instance credentials. if you look at the java sdk the ECS credential wrapper loads with the following conditionals


            if (System.getenv(ECS_CONTAINER_CREDENTIALS_PATH) != null) {
                return new ContainerCredentialsProvider(new ECSCredentialsEndpointProvider());
            }
            if (System.getenv(CONTAINER_CREDENTIALS_FULL_URI) != null) {
                return new ContainerCredentialsProvider(new FullUriCredentialsEndpointProvider());
            }
            return InstanceProfileCredentialsProvider.getInstance();

And falls back to what you already had.

I have tested running this in our environment and it worked like a charm.

-Jeff

mbarton commented 6 years ago

I've just released 1.4.3 with this fix, should be available soon