• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..22-Jan-2021-

README.mdH A D22-Jan-2021960 3320

instancesByRegion.goH A D22-Jan-20213.3 KiB138104

README.md

1
2# Example  Fetch By region
3
4This is an example using the AWS SDK for Go to list ec2 instances instance state By different region . By default it fetch all running and stopped instance
5
6
7# Usage
8
9
10```sh
11# To fetch the stopped and running instances of all region use below:
12./filter_ec2_by_region --state running --state stopped
13
14# To fetch the stopped and running instances for region us-west-1 and eu-west-1 use below:
15./filter_ec2_by_region --state running --state stopped --region us-west-1 --region=eu-west-1
16```
17
18## Sample Output
19
20```
21Fetching instace details  for region: ap-south-1 with criteria:  [running][stopped]**
22 printing instance details.....
23instance id i-************
24current State stopped
25done for region ap-south-1 ****
26
27
28
29Fetching instace details  for region: eu-west-2 with criteria:  [running][stopped]**
30 There is no instance for the for region eu-west-2 with the matching Criteria: [running][stopped]
31done for region eu-west-2 ****
32```
33