Skip to main content

AWS Credentials Clipboard Updater

A command-line utility to manage AWS credentials. Update, list, or delete profiles in your AWS credentials file efficiently.

Installation

Homebrew (macOS/Linux)

brew tap vavasilva/tap
brew install aws-credentials-clipboard-updater

pip (Global)

pip install git+https://github.com/vavasilva/aws-credentials-clipboard-updater.git

From Source

Prerequisites

  • Python 3.7 or higher
  • Virtual environment recommended

Steps

  1. Clone the repository:
git clone https://github.com/vavasilva/aws-credentials-clipboard-updater.git
cd aws-credentials-clipboard-updater
  1. Install:
pip install -e .

System Dependencies

For clipboard functionality on Linux systems:

  • Debian/Ubuntu: sudo apt-get install xclip xsel
  • Fedora: sudo dnf install xclip xsel
  • Arch: sudo pacman -S xclip xsel

Supported Formats

The tool accepts credentials in multiple formats:

AWS STS Response (JSON)

Direct output from aws sts assume-role or similar commands:

{
  "Credentials": {
    "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
    "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
    "SessionToken": "AQoDYXdzEJr..."
  }
}

Simple JSON (PascalCase)

{
  "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
  "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "SessionToken": "AQoDYXdzEJr..."
}

Simple JSON (snake_case)

{
  "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
  "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "aws_session_token": "AQoDYXdzEJr..."
}

INI Format

[profile_name]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
aws_session_token = AQoDYXdzEJr...

Note: SessionToken/aws_session_token is optional for permanent credentials.

Usage

Update AWS Profile

From clipboard (copy credentials first, then run):

awscreds update --profile my_profile

With explicit data:

awscreds update --profile my_profile --data '{"AccessKeyId": "AKIA...", "SecretAccessKey": "secret...", "SessionToken": "token..."}'

List Profiles

awscreds list

Delete Profile

awscreds delete --profile my_profile

Examples

Example 1: Update profile from AWS STS assume-role

# Copy the output from AWS CLI to clipboard
aws sts assume-role --role-arn arn:aws:iam::123456789:role/MyRole --role-session-name session1 | pbcopy

# Update profile
awscreds update --profile dev

Example 2: Quick update with inline JSON

awscreds update --profile prod --data '{
  "AccessKeyId": "AKIAIOSFODNN7EXAMPLE",
  "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
}'

Example 3: Update from SSO/Identity Center portal

  1. Copy credentials from AWS SSO portal (usually in INI format)
  2. Run:
awscreds update --profile sso-dev

Contributing

Contributions welcome! Please open an issue or submit a pull request on GitHub.

Download files

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

Source Distribution

aws_credentials_clipboard_updater-1.0.7.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file aws_credentials_clipboard_updater-1.0.7.tar.gz.

File metadata

File hashes

Hashes for aws_credentials_clipboard_updater-1.0.7.tar.gz
Algorithm Hash digest
SHA256 22da3097777f6dfec0c6366b807cd36ab7a3a1302229b95f5da4f72d0199344e
MD5 fc87498af1b9a43e81391320cc001f36
BLAKE2b-256 19cd425de3b62cac9a197ecb0cee8ede97de74500bd0ada426586a715c850323

See more details on using hashes here.

File details

Details for the file aws_credentials_clipboard_updater-1.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_credentials_clipboard_updater-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4e76281da5631569b3106b01b15d7ba8e9604703dfe66250ad639e0ab8d3e6b2
MD5 a7a9f8b15f83cf78302a100c5c544089
BLAKE2b-256 f66f8f11cee1f78c8959c87ccca616100e3384943dce28680d7f8d708cc0feeb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 files

1.0.6

2 files

1.0.5

2 files

Supported by

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