From the course: Python: Pen Testing AWS
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Managing IAM programmatically - Python Tutorial
From the course: Python: Pen Testing AWS
Managing IAM programmatically
- [Instructor] We've already seen how we can access the IAM service to identify account authorizations. Let's take a look at some other IAM functions we can call. We'll start with the standard program frame. Nano starter.py minus L and let's add a heading, print IAM enumerator and we'll underline it. We'll start a session on IAM using scenario one. IAMs equals boto3.session.Session profile name equals scenario one, region name equals US West two, and the client service name equals IAM. Okay, let's list users. Print user list. Users equals IAMs and we'll call list users for X in users users. So, for every user, we will print X user name. Okay, let's now see how we list groups. Print groups, groups equal IAMs.list groups, the function call, and again for X in groups groups structure print X group name. We can also list the access keys for each user. Print access keys and the access keys we'll find…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Taking a first look at the Python boto3 AWS library3m 19s
-
(Locked)
Enumerating policies2m 4s
-
(Locked)
Adding sessions to your Python scripts2m 6s
-
(Locked)
Checking for guards2m 38s
-
(Locked)
Managing IAM programmatically2m 44s
-
(Locked)
Creating users programmatically2m 28s
-
(Locked)
Managing secrets using Python3m 42s
-
(Locked)
Listing all EC2 instances7m 6s
-
(Locked)
Listing all RDS instances3m 36s
-
(Locked)
Challenge1m 15s
-
(Locked)
Solution42s
-
(Locked)
-
-
-