lein-lambda
lein-lambda copied to clipboard
Must specify userName when calling with non-User credentials
When running lein lambda deploy production to an account where the user is connected via assume-role from a different aws account, you get this error:
com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.
at com.amazonaws.client.builder.AwsClientBuilder.setRegion (AwsClientBuilder.java:371)
com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties (AwsClientBuilder.java:337)
...
amazonica.core$intern_function$fn__5110.doInvoke (core.clj:995)
clojure.lang.RestFn.invoke (RestFn.java:397)
lein_lambda.identitymanagement$account_id.invokeStatic (identitymanagement.clj:8)
lein_lambda.identitymanagement$account_id.invoke (identitymanagement.clj:7)
From the command line, instead of
aws iam get-user
use
aws sts get-caller-identity
Added a PR #4 to fix this issue