Skip to main content

AWS Privileged Actions CLI (aws-priv-actions)

A command-line interface for performing privileged actions on AWS member accounts in an organization, when Centralized Root Management is enabled.

⚠️ Disclaimer

This software allows you to assume AWS IAM root privileges, which can have significant security and operational impacts if misused. Use with caution. The authors and contributors provide this software "as is", without warranty of any kind, express or implied. You are solely responsible for any actions taken using this tool.

Why?

As of the time of writing, there is no AWS API to fetch the list of available task policies. This is a workaround to allow you to perform privileged actions on AWS member accounts in an organization.

This was built as a simple tool to allow Operators to use the assume-root feature of AWS Centralized Root Management in critical situations requring root access, without having to pour over AWS CLI documentation.

Installation

pip install aws-priv-actions

Prerequisites

  • Python 3.8 or higher
  • AWS CLI configured with appropriate credentials
  • Required IAM permissions to perform privileged actions

Usage

List Available Task Policies

aws-priv-actions list-policies

Assume Root Privileges

aws-priv-actions assume-root <target-principal> <task-policy> [--duration-seconds SECONDS] [--region REGION] [--verbose]
  • The --region flag is required for the assume-root command, as the AWS global STS endpoint is not supported for this operation. If not provided, you will be prompted interactively (default: us-east-1).
  • The CLI always uses the correct regional STS endpoint (e.g., sts.us-east-1.amazonaws.com).

Example (with region flag):

aws-priv-actions assume-root arn:aws:iam::123456789012:root IAMAuditRootUserCredentials --region us-east-1 --verbose

Example (interactive region prompt):

aws-priv-actions assume-root arn:aws:iam::123456789012:root IAMAuditRootUserCredentials
Enter the AWS region to use for STS (must be a regional endpoint) [us-east-1]:

Available Task Policies

  • IAMAuditRootUserCredentials: Audit root user credentials
  • IAMCreateRootUserPassword: Create root user password
  • IAMDeleteRootUserCredentials: Delete root user credentials
  • S3UnlockBucketPolicy: Unlock S3 bucket policy
  • SQSUnlockQueuePolicy: Unlock SQS queue policy

Development

  1. Clone the repository

  2. Install UV (if not already installed):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  3. Install development dependencies:

    uv pip install -e .
    
  4. Run tests:

    pytest
    

License

MIT License

Metadata

Release files for aws-priv-actions 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-priv-actions 1.0.0
File Size Uploaded
aws_priv_actions-1.0.0.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-priv-actions 1.0.0
File Interpreter ABI Platform
aws_priv_actions-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.5 kB

Release files / aws_priv_actions-1.0.0.tar.gz

Download URL aws_priv_actions-1.0.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6f5a5ee0bbc0bd204c398e72e2d9ba5454171719843769ee554ce1b4040a55
BLAKE2b-256 checksum
How to use checksums
bcb0df34c3c7a8afcb6d1d3d6dec768e0e9933641e2260adba3f79fad0e887ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.

Transparency log

Release files / aws_priv_actions-1.0.0-py3-none-any.whl

Download URL aws_priv_actions-1.0.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
012bce7ac53850a3582b737138c2bdf184b2896c1fba40713df7255b5ac84f86
BLAKE2b-256 checksum
How to use checksums
bc7b9c9cb1c9a9eadc2d3fa42533a1198ac2be1c74f9fcb54bc9d1387348cd19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page