aws-access-advisor
Overview
Generate IAM actions list from AWS Access Advisor reports.
Prerequisites
Python >= 3.6
aws-authenticator (https://pypi.org/project/aws-authenticator/) >= 2022.10.1.0
Required Arguments
AWS entity ARN (role, user, etc. to use for report generation)
AWS authentication method (profile, iam, or sso)
Conditional Arguments
If authenticating with named profiles:
AWSCLI profile name
If authenticating with IAM acccess key credentials:
AWS access key id
AWS secret access key
If authenticating with SSO:
AWS account ID
AWS SSO Permission Set (role) name
AWS SSO login URL
Usage
Installation:
pip3 install aws-access-advisor
# or
python3 -m pip install aws-access-advisor
In Python3 authenticating with named profiles:
import aws_access_advisor as access
report = access.get_report(
"<entity_arn>",
"profile",
profile_name="<profile_name>",
)
print(
f'Job status: {report["JobStatus"]} after {report["processing_time"]} second(s).'
)
print("\n".join(access.parse(report)))
In Python3 authenticating with IAM access key credentials:
import aws_access_advisor as access
report = access.get_report(
"<entity_arn>",
"iam"
access_key_id="<access_key_id>",
secret_access_key="<secret_access_key>",
)
print(
f'Job status: {report["JobStatus"]} after {report["processing_time"]} second(s).'
)
print("\n".join(access.parse(report)))
In Python3 authenticating with SSO:
import aws_access_advisor as access
report = access.get_report(
"<entity_arn>",
"sso"
sso_url="<sso_url>",
sso_role_name="<sso_role_name>",
sso_account_id="<sso_account_id>",
)
print(
f'Job status: {report["JobStatus"]} after {report["processing_time"]} second(s).'
)
print("\n".join(access.parse(report)))
In BASH authenticating with named profiles:
python [/path/to/]aws_access_advisor \
-e <entity_arn> \
-m profile \
-p <profile_name>
In BASH authenticating with IAM access key credentials:
python [/path/to/]aws_access_advisor \
-e <entity_arn> \
-m iam \
-k <access_key_id> \
-s <secret_access_key>
In BASH authenticating with SSO:
python [/path/to/]aws_access_advisor \
-e <entity_arn> \
-m sso \
-a <sso_account_id> \
-r <sso_role_name> \
-u <sso_url>
Release files for aws_access_advisor 2024.1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_access_advisor-2024.1.0.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_access_advisor-2024.1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / aws_access_advisor-2024.1.0.0.tar.gz
| Download URL | aws_access_advisor-2024.1.0.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
076593c5e118ec22cbd13cc752d1371f96b35e826e31d106891913393b57baa1
|
|
BLAKE2b-256 checksum How to use checksums |
357285b986441d275d602acffd6ec1e776a7ceedfa89cb5ec992b96d044835ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.4.109+
|
Release files / aws_access_advisor-2024.1.0.0-py3-none-any.whl
| Download URL | aws_access_advisor-2024.1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
364f69697d238cc8b043c9b156954b115b915c3c030fc4784ba20adcc400536a
|
|
BLAKE2b-256 checksum How to use checksums |
014613cea50385220c2bda937bf6489b905eda13e1e661af2cc606a77876607a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/5.4.109+
|