Skip to main content

Generate IAM actions list from AWS Access Advisor reports.

Project description

Overview

Generate IAM actions list from AWS Access Advisor reports.

Prerequisites

  • Python >= 3.6

  • [aws-ssooidc](https://pypi.org/project/aws-ssooidc/) >= 2021.1.1.1

  • [boto3](https://pypi.org/project/boto3/) >= 1.17.78

Required Arguments

  • AWS account ID

  • AWS entity ARN (role, user, etc. to use for report generation)

  • AWS SSO Permission Set (admin role) name for login purposes

  • AWS SSO login URL

Usage

Installation:

pip3 install aws-access-advisor
# or
python3 -m pip install aws-access-advisor

In Python3:

import aws_access_advisor as access

auth = access.login("<account_id>", "<sso_url>", "<admin_role_name>")
report = access.get_report(
   "<entity_role_arn>",
   auth["roleCredentials"]["accessKeyId"],
   auth["roleCredentials"]["secretAccessKey"],
   auth["roleCredentials"]["sessionToken"]
)
print(
   f'Job status: {report["JobStatus"]} after {report["processing_time"]} second(s).'
)
print('\n'.join(access.parse(report)))

In BASH:

python [/path/to/module/]__init__.py \
-a <account_id> \
-e <entity_role_arn> \
-r <admin_role_name> \  # [OPTIONAL]
-u <sso_url> \  # [OPTIONAL]
> <output_path>

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

aws_access_advisor-2022.10.1.3.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

aws_access_advisor-2022.10.1.3-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

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