diff options
author | Kyle K <kylek389@gmail.com> | 2020-09-13 16:49:33 -0500 |
---|---|---|
committer | Kyle K <kylek389@gmail.com> | 2020-09-13 16:49:33 -0500 |
commit | 40de87995b901f72a4dd1f394af3c20c24c73541 (patch) | |
tree | d73614d825f53152b60239779309e0002f6d3283 /aws-list-ec2.py | |
parent | a3d3368d9f024052632dc87b5d52e26a223c7869 (diff) | |
download | PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.gz PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.bz2 PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.zip |
small class exmaple with a global variable
Diffstat (limited to 'aws-list-ec2.py')
-rw-r--r-- | aws-list-ec2.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 |