From 40de87995b901f72a4dd1f394af3c20c24c73541 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sun, 13 Sep 2020 16:49:33 -0500 Subject: small class exmaple with a global variable --- aws-list-ec2.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 aws-list-ec2.py (limited to 'aws-list-ec2.py') diff --git a/aws-list-ec2.py b/aws-list-ec2.py new file mode 100644 index 0000000..1a7fc5a --- /dev/null +++ b/aws-list-ec2.py @@ -0,0 +1,5 @@ +import boto3 + +ec2 = boto3.resource('ec2') +for i in ec2.instances.all(): + print(i.id) \ No newline at end of file -- cgit v1.2.3