Fork me on GitHub
#aws
<
2021-04-23
>
dabrazhe18:04:57

@kenny I managed to assume role based on the source profile defined in the aws credentials file. Is it smth you are looking for ?

(def cred-provider (assumed-role-credentials-provider "devprofile2" "arn:aws:iam::61823312345:role/SysAdmin"))

dabrazhe18:04:48

That's lots of text : ) , cant go through it now. In short, there are examples here how to assume the IAM role, have a look at (defn assumed-role-credentials-provider [role-arn] https://github.com/cognitect-labs/aws-api/blob/master/examples/assume_role_example.clj

kenny18:04:43

Right. That’s the first part. The above implements the flow described here https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html