Created
September 15, 2020 15:49
-
-
Save rujmah/66c302d9e28ea00bff2b5954977cb44c to your computer and use it in GitHub Desktop.
Quick example of getting EC2 instance ids with JS async await
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk') | |
AWS.config.update({region: 'eu-west-1'}) | |
const ec2 = new AWS.EC2() | |
const inst = ec2.describeInstances().promise() | |
async function main(){ | |
const result = await inst | |
console.log('instances', result) | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment