lein-lambda icon indicating copy to clipboard operation
lein-lambda copied to clipboard

Must specify userName when calling with non-User credentials

Open cymantic opened this issue 7 years ago • 1 comments

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

cymantic avatar Apr 05 '18 00:04 cymantic

Added a PR #4 to fix this issue

cymantic avatar Apr 05 '18 09:04 cymantic