Skip to content
Advertisement

List the number of running instances in an AWS region

I want to list the number of all running ec2 instances in the us-west-2 region and I was able to list the instances but actually, I want the number of instance names is not nessosry. please see that below code

JavaScript

Output is here

enter image description here

Output type

enter image description here

Advertisement

Answer

You can store those names in a list, and check the list length:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement