Skip to main content

No project description provided

Project description

pyiamvortex

A python utility library used for getting all available AWS IAM actions and performing different operations on them.

Summary

There is no available API to list out all of the available AWS IAM actions. This library uses the AWS Policy Generator to get all of the available actions and then parses them into a usable format.

Creating a Vortex is an operating environment where you initalize the backend of available AWS IAM actions in which you can perform different operations within this context. The default backend is the AWS Policy Generator, but you can also create a Vortex with a custom backend.

This tool is useful for building AWS Least Privilege IAM policies.

Install

pip install pyiamvortex

Usage

CLI

pyiamvortex get-aws-services # prints all available AWS services (i.e. ec2, s3, iam, etc.)
pyiamvortex get-aws-actions # prints all available AWS actions (i.e. ec2:DescribeInstances, s3:GetObject, etc.)
pyiamvortex get-aws-actions sts # prints all available AWS actions for the sts service
>>
[
    "sts:AssumeRole",
    "sts:AssumeRoleWithSAML",
    "sts:AssumeRoleWithWebIdentity",
    "sts:DecodeAuthorizationMessage",
    "sts:GetAccessKeyInfo",
    "sts:GetCallerIdentity",
    "sts:GetFederationToken",
    "sts:GetServiceBearerToken",
    "sts:GetSessionToken",
    "sts:SetSourceIdentity",
    "sts:TagSession"
]
pyiamvortex expand-aws-wildcard 'sts:AssumeRole*' # expands the wildcard to all available AWS actions that matches the pattern
>>
[
    "sts:AssumeRole",
    "sts:AssumeRoleWithSAML",
    "sts:AssumeRoleWithWebIdentity"
]

Python Library

from pyiamvortex import Vortex

vortex = Vortex() # initializes a vortex object with the default AWS actions map from AWS Policy Generator
print(vortex.get_aws_services()) # prints all available AWS services (i.e. ec2, s3, iam, etc.)
print(vortex.get_aws_actions()) # prints all available AWS actions (i.e. ec2:DescribeInstances, s3:GetObject, etc.)
print(vortex.get_aws_actions("s3")) # prints all available AWS actions for the s3 service (i.e. s3:GetObject, s3:PutObject, etc.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyiamvortex-0.3.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

pyiamvortex-0.3.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pyiamvortex-0.3.1.tar.gz.

File metadata

  • Download URL: pyiamvortex-0.3.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pyiamvortex-0.3.1.tar.gz
Algorithm Hash digest
SHA256 53af433c18c0ea12dbdc785661a5011e030331250cd4404125f5de3d7078b4d5
MD5 3f2ec0a66d0a9e4c30ec47895e61a290
BLAKE2b-256 2101665655e9de572d29d6820c1f12f7f4c185ac20019fba7bdcaf4ed1fe5bf8

See more details on using hashes here.

File details

Details for the file pyiamvortex-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyiamvortex-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for pyiamvortex-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d08181ce9a785c5b3021fa90d79dd32b05c2fedc4a623dbfe4d80ede83e20614
MD5 a83d3c97bef70ccb9302fd3e2a5c2786
BLAKE2b-256 f388227009824bbf327ed972e211687133241b97462cd3632893e0a8ef6473b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page