pod-babashka-aws icon indicating copy to clipboard operation
pod-babashka-aws copied to clipboard

When invoking sso it should not need creds

Open benjamin-asdf opened this issue 4 years ago • 3 comments

The sso client is special and does not need creds from profile, environment etc. When using sso - get credentials, sometimes I don't have creds yet.

;basically my issue is this: 

(aws/invoke
    (aws/client {:api :sso})
    {:op :GetRoleCredentials
     :request req})
 -> now it says unable to fetch credentials, if I don't have credentials configured for the default profile

My kludge around this is that I configure a dummy profile and make a sso client like this:

(aws/client
   {:api :sso
    :credentials-provider (creds/profile-credentials-provider
                           "dummy_profile")})
                        

same issue with cognitect lib https://github.com/cognitect-labs/aws-api/issues/207

benjamin-asdf avatar Mar 19 '22 08:03 benjamin-asdf

OK, better to fix it upstream probably and then we can include the fix here.

borkdude avatar Mar 19 '22 09:03 borkdude

What is the imports for this?

mspencer-hm avatar Jun 17 '22 21:06 mspencer-hm

     [cognitect.aws.credentials :as creds]
     [cognitect.aws.client.api :as aws]

if jvm lib

and

[pod.babashka.aws :as aws]
     [pod.babashka.aws.credentials :as creds]

with bb pod

benjamin-asdf avatar Jun 24 '22 12:06 benjamin-asdf