Hi guys, I would like to retrieve some properties ...
# typescript
s
Hi guys, I would like to retrieve some properties from an aws.Provider(), such as the AccessKey or the SecretKey, in order to inject them to my shell environment. The reason is I'm running some EKS stack in different account from several automation role and I need to have the right "automation-role' credentials injected into my environment in order to reach the K8s API in those different accounts I am creating the aws.Provider() as so :
Copy code
new aws.Provider(
      `${account}-assume-role-${region}`,
      {
        assumeRole: {
          roleArn: `arn:aws:iam::${acc.Id}:role/automation-role`,
          sessionName: "xxxx",
          externalId: "xxxx"
        },
        region
      },
      { version: "2.13.1" }
    );
b
We have a tutorial on how to do this which can be found here. Have a look at that and see if it helps