Skip to main content

CLI for privileged actions on AWS member accounts

Project description

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

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_priv_actions-1.0.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_priv_actions-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file aws_priv_actions-1.0.0.tar.gz.

File metadata

  • Download URL: aws_priv_actions-1.0.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aws_priv_actions-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d6f5a5ee0bbc0bd204c398e72e2d9ba5454171719843769ee554ce1b4040a55
MD5 ae4692fa04e04bcf88d16be30b9f05d2
BLAKE2b-256 bcb0df34c3c7a8afcb6d1d3d6dec768e0e9933641e2260adba3f79fad0e887ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_priv_actions-1.0.0.tar.gz:

Publisher: release.yml on clarkemn/aws-priv-actions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aws_priv_actions-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_priv_actions-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 012bce7ac53850a3582b737138c2bdf184b2896c1fba40713df7255b5ac84f86
MD5 bd0849f534e5013d67ef84a7f42f5b60
BLAKE2b-256 bc7b9c9cb1c9a9eadc2d3fa42533a1198ac2be1c74f9fcb54bc9d1387348cd19

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_priv_actions-1.0.0-py3-none-any.whl:

Publisher: release.yml on clarkemn/aws-priv-actions

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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