Skip to content

Instantly share code, notes, and snippets.

@jolexa
Created March 23, 2017 15:31
Show Gist options
  • Save jolexa/4a08c85498992b2141ab91fba2f65d2f to your computer and use it in GitHub Desktop.
Save jolexa/4a08c85498992b2141ab91fba2f65d2f to your computer and use it in GitHub Desktop.
Python script to open IAM documentation in new tab
#!/usr/bin/env python
import sys
import webbrowser
service = sys.argv[1]
url = "https://docs.aws.amazon.com/IAM/latest/UserGuide/list_{}.html".format(service)
webbrowser.open(url, new=2)
@jolexa
Copy link
Author

jolexa commented Mar 23, 2017

Create a bash function in your shell rc file

function iam_help() { 
wget -q https://gist.githubusercontent.com/jolexa/4a08c85498992b2141ab91fba2f65d2f/raw/c33662e294bc7f4df24d892a33992c0527b8a6de/open_aws_iam_url.py && \
python ./open_aws_iam_url.py $1 && \
rm -f open_aws_iam_url.py
}

Then, whenever you need to know some AWS IAM docs, open the link:
Example, for ec2:* info: iam_help ec2
Example, for autoscaling:* info: iam_help autoscaling

Credit: @brycetho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment