rotate-aws-keys

Generate a bash script to rotate AWS IAM access keys.

4|5|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/Luney-Industries/farty-bobo --skill rotate-aws-keys-luney-industries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rotate-aws-keys
Source: https://github.com/Luney-Industries/farty-bobo/tree/main/skills/rotate-aws-keys
Command: npx skills add https://github.com/Luney-Industries/farty-bobo --skill rotate-aws-keys-luney-industries

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires aws-cli, jq, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a secure method for generating a self-contained bash script to rotate AWS IAM access keys for a given user, allowing users to review and execute the script themselves, avoiding direct execution of AWS commands.

Core Features & Use Cases

  • Generate Safe Script: Produces a bash script for AWS key rotation, which can be reviewed before execution.
  • Automated Process: Reads the current key from ~/.aws/credentials, verifies credentials, creates a new key, updates credentials, and verifies the new key.
  • Rollback Instructions: Includes rollback instructions in case the new key fails verification.
  • Prerequisites Check: Ensures that aws CLI and jq are installed on the user's machine.

Quick Start

Run the command 'rotate-aws-keys' to start the process and follow the prompts.

Frequently Asked Questions about rotate-aws-keys

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a script for AWS IAM access key rotation?

AWS IAM access key rotation is handled by generating a self-contained bash script that reads current credentials, creates new keys, updates the credentials file, and verifies functionality. You run the command and follow prompts to produce the script for review before execution.

Do I need AWS CLI and jq installed to rotate IAM access keys?

Yes, AWS CLI and jq are required dependencies for IAM access key rotation. The generated bash script checks for these prerequisites on your machine to ensure it can successfully read credentials, parse JSON outputs, and verify key propagation.

What happens if my new AWS access key fails verification during rotation?

If new AWS access key verification fails during rotation, the process includes rollback instructions. This safety mechanism ensures you can revert to the previous working credentials and avoid being locked out of your IAM user account.

Can I review the bash script before it executes AWS credential rotation?

Yes, you can review the bash script before execution. This Skill produces a self-contained script for rotating AWS IAM access keys rather than directly executing AWS commands, allowing you to inspect the credential reading and key update logic beforehand.

What's the best way to safely update AWS credentials in ~/.aws/credentials?

Safely updating AWS credentials involves using an automated script that reads the current key from ~/.aws/credentials, creates a new key, updates the file, and verifies the new key. This method ensures IAM propagation is checked before completing the rotation.