Iamlive

1 min read aws, iam

Written in 2021. Tools, APIs and prices may have changed since.

Lab note What I wrote down while learning this by building with it. Short by design; the code is in pfeilbr/iamlive-playground.

learn iann0036/iamlive - cli tool to Generate an IAM policy from AWS calls using client-side monitoring (CSM) or embedded proxy

Demo

CSM Mode (Client-side monitoring mode) Example with AWS CLI

# run in CSM mode example and generate policy from aws cli
# can add `--output-file iamlive-policy-output.json` to save generated policy in file
iamlive --set-ini

# run the following in another shell
aws s3 ls s3://amzn-s3-demo-bucket


Proxy Mode Example with AWS CLI

# run in proxy  mode example and generate policy from aws cli
iamlive --set-ini --mode proxy

# run the following in another shell
export AWS_CA_BUNDLE=~/.iamlive/ca.pem
export HTTP_PROXY=http://127.0.0.1:10080
export HTTPS_PROXY=http://127.0.0.1:10080


CSM Mode (Client-side monitoring mode) Example with AWS SDK for JavaScript v2

see index.js

# run in CSM mode example and generate policy from aws cli
iamlive --set-ini

# run the following in another shell

# install node deps
npm install

# run nodejs script that uses `aws-sdk`
node index.js


Resources

Keep learning

Get new guides and courses by email

An occasional email when I publish a new guide, course or post. No spam, and you can unsubscribe any time.

Sent with Buttondown. I never share your address. Prefer a feed? Use the RSS feed.