https://pulumi.com logo
#general
Title
# general
f

full-dress-10026

09/25/2018, 5:48 PM
I see. I really only need the account id for the caller, and because promises can be used as inputs, this should work:
Copy code
let awsAccountId = aws.getCallerIdentity().then((value => {
    return value.accountId;
}));
👍 1
w

white-balloon-205

09/25/2018, 5:53 PM
Yep - and just for completeness - you can also use async/await in these cases like this - which I often personally prefer:
Copy code
async function getAccountId() {
  let identity = await aws.getCallerIdentity();
  return identity.accountId;
}
let awsAccountId = getAccountId();
👍 1