rotate-aws-keys

Generate a reviewable bash script to rotate AWS IAM user access keys.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

AWS IAM key rotation is sensitive and manual because executing commands directly can lock you out or leave backups outdated, so this Skill gives you a fully reviewed script that you control instead of Claude running dangerous AWS operations.

Core Features & Use Cases

  • Script generation: Produces a self-contained bash script from a template, inserting the requested IAM username and profile so the user reviews every step before execution.
  • Verification and rollback prep: Reads ~/.aws/credentials, verifies current credentials, checks AWS key limits, stores a timestamped backup, validates the new key with retries, and outlines rollback steps before deleting the old key.
  • Use Case: When a user tells Claude their AWS keys are old or they need to rotate credentials, respond with this Skill to create a vetted workflow they can run locally while keeping shared profiles intact.

Quick Start

Generate a reviewed AWS rotation script by specifying the IAM user and profile, saving it locally, and running bash rotate-aws-keys.sh.

Frequently Asked Questions about rotate-aws-keys

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

FAQPage Schema
How do I safely rotate AWS IAM keys without getting locked out?

AWS IAM key rotation is handled by generating a reviewable bash script that verifies old credentials, creates a new key, updates ~/.aws/credentials, confirms propagation, and deletes the old key with timestamped backups.

What is the best way to automate AWS credential rotation for a specific profile?

The best way to automate AWS credential rotation is generating a self-contained bash script that inserts the requested IAM username and profile, allowing you to review every step before executing it locally to keep shared profiles intact.

Do I need jq and aws-cli to rotate IAM access keys locally?

Yes, you need both aws-cli and jq installed locally. The rotation script uses jq to parse AWS CLI outputs and validate old credentials before creating a new key and updating your ~/.aws/credentials file.

Can I generate an AWS key rotation script without executing AWS commands directly?

Yes, this Skill produces a vetted bash script from a template instead of executing AWS commands directly, ensuring you review every operation before running it in your local environment.

What happens if AWS IAM key propagation fails during rotation?

If propagation fails, the generated script stores a timestamped backup of your credentials and outlines rollback steps before deleting the old key, allowing you to restore your previous working configuration.

Does this AWS key rotation approach work with shared AWS profiles?

Yes, the script keeps shared AWS profiles intact by reading and updating only the specific IAM user and profile entries in your ~/.aws/credentials file during the rotation workflow.