Created
July 10, 2023 09:40
-
-
Save greencamp20552/4afeb4c412eeb27e058d6370513cdf57 to your computer and use it in GitHub Desktop.
aws-architect-professional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def list_policies(): | |
| iam = boto3.client("iam") | |
| paginator = iam.get_paginator('list_policies') | |
| for response in paginator.paginate(Scope="AWS"): | |
| for policy in response["Policies"]: | |
| print(f"Policy Name: {policy['PolicyName']} ARN: {policy['Arn']}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment