Secrets Manager
AWS Secrets Manager for secure secret storage and rotation.
Install
npx skills add itsmostafa/aws-agent-skills --skill secrets-manager -g -a claude-code -y- Repository
- itsmostafa/aws-agent-skills1.2k
- Category
- DevOps
- Updated
- 9d ago
- License
- MIT
- Context cost
- Mediumabout 2,173 tokens
- Runs scripts
- No, instructions only
What it does
AWS Secrets Manager for secure secret storage and rotation. Use when storing credentials, configuring automatic rotation, managing secret versions, retrieving secrets in applications, or integrating with RDS.
AWS Secrets Manager
AWS Secrets Manager helps protect access to applications, services, and IT resources. Store, retrieve, and automatically rotate credentials, API keys, and other secrets.
Table of Contents
Core Concepts
Secrets
Encrypted data stored in Secrets Manager. Can contain:
- Database credentials
- API keys
- OAuth tokens
- Any key-value pairs (up to 64 KB)
Versions
Each secret can have multiple versions:
- AWSCURRENT: Current active version
- AWSPENDING: Version being rotated to
- AWSPREVIOUS: Previous version
Rotation
Automatic credential rotation using Lambda functions. Built-in support for:
- Amazon RDS
- Amazon Redshift
- Amazon DocumentDB
- Custom secrets
Common Patterns
Create a Secret
AWS CLI:
# Create secret with JSON
aws secretsmanager create-secret \
--name prod/myapp/database \
--description "Production database credentials" \
--secret-string '{"username":"admin","password":"MySecurePassword123!","host":"mydb.cluster-xyz.us-east-1.rds.amazonaws.com","port":5432,"database":"myapp"}'
# Create secret with binary data
aws secretsmanager create-secret \
--name prod/myapp/certificate \
--secret-binary fileb://certificate.pem
boto3:
import boto3
import json
secrets = boto3.client('secretsmanager')

