Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support IAM Roles for Tasks when running in AWS ECS #197
Spring Cloud has support for using the IAM instance profile for credential credential retrieval when running in AWS. However, when attempting to use AWS ECS IAM roles for tasks the application will still use the host instance profile.
As far as I understand the difference between an instance profile and a task role should be transparent for AWS SDK for Java post version 1.11.16 so I assuming there are some explicit controls in Spring Cloud that prevent IAM roles for tasks from working.
See below the application has a ECS task role
We work around it by overriding the Spring auth chain with the AWS default ones: