Calamari icon indicating copy to clipboard operation
Calamari copied to clipboard

Allow all types of worker credentials for EKS discovery

Open scme0 opened this issue 2 years ago • 1 comments

Background

Originally worker credentials were discovery for EKS discovery by initially trying to retrieve EC2 credentials and then attempt to use Environment variable based account credentials. This means that other valid credentials that could be used (such as a k8s pod IAM role available to all containers in that pod).

Result

I've updated the code so that it now uses a "FallbackFactory" which will go through all the different ways AWS can authenticate and this should (pending tests) cover the case above.

Note: that AWS has a specific order in which it attempts to retrieve credentials with EC2 instance being the last one. This is an AWS factory so I think that order should be sufficient for most users and it should match other AWS SDKs (like the one used for step-package-ecs target discovery)

[sc-25801]

scme0 avatar Oct 10 '22 03:10 scme0