
Creating Secrets Using Best Practices
Dedicated-KMS, rotation-enabled procedure for creating AWS Secrets Manager secrets with production-grade controls.
- skills.sh installs
- 7.4K
- GitHub stars
- 3.5K
- last updated
- Aug 21, 2026
What it does
- Covers creating secrets of four types: database credentials, API keys, OAuth tokens, and custom secrets
- Encrypts each secret with a dedicated KMS key, with rotation, least-privilege IAM, and CloudTrail auditing
- Provides troubleshooting guidance for KMS key access, rotation Lambda failures, and secret access denied errors
- Designed for teams creating production secrets in AWS Secrets Manager that need consistent security controls
Install
$ npx -y skills add aws/agent-toolkit-for-aws --skill creating-secrets-using-best-practices -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Creating Secrets Using Best Practices
Overview
Domain expertise for creating and managing secrets in AWS Secrets Manager with production-grade security controls: KMS encryption, automatic rotation, least-privilege IAM policies, CloudTrail auditing, and lifecycle management.
Create a secret with best practices
To create a properly secured secret in AWS Secrets Manager, follow the procedure exactly. See secret creation procedure.
The procedure supports four secret types: database credentials, API keys, OAuth tokens, and custom secrets. Each type is structured appropriately and encrypted with a dedicated KMS key.
Troubleshooting
KMS key access issues
Verify the IAM principal has kms:CreateKey and kms:PutKeyPolicy permissions, and that
the key policy grants kms:GenerateDataKey, kms:Decrypt, and kms:DescribeKey scoped
with kms:ViaService to secretsmanager.<region>.amazonaws.com. See the full procedure for details.
Rotation setup failures
Check that the Lambda rotation function exists, has proper permissions, and can reach the target system. Review CloudWatch logs for the rotation function.
Details
- Repository
- github.com/aws/agent-toolkit-for-aws
- Categories
- Security, DevOps & Cloud
- First seen
- May 16, 2026
More from aws/agent-toolkit-for-aws
All 54- Exploring Data Catalog7.3K
- Querying Data Lake7.3K
- Storing And Querying Vectors7.3K
- Connecting Lambda To Api Gateway7.3K
- Aws Sdk Swift Usage7.3K
- Ingesting Into Data Lake7.2K
- Aws Amplify7.2K
- Creating Data Lake Table7.2K
- Finding Data Lake Assets7.2K
- Troubleshooting Application Failures7.2K
- Connecting Lambda To Dynamodb7.1K
- Configuring Vpc Endpoints For Private Aws Service Access7.1K
- Debugging Lambda Timeouts7.1K
- Setting Up Cloudwatch Alarm Notifications7K
- Launching Ec2 Instance With Best Practices7K
- Troubleshooting S3 Files7K
- Creating Api Gateway Stage7K
- Setting Up Ec2 Instance Profiles6.9K
- Signing In To Aws6.9K
- Creating Production Vpc Multi Az6.8K
- Aws Transform6.8K
- Connecting Vpcs With Peering6.8K
- Enabling Lambda Vpc Internet Access6.8K
- Exporting Rds To S36.7K
Similar to Creating Secrets Using Best Practices
More Security
secrets-manageritsmostafa/aws-agent-skills157 installsAWS Secrets Manager reference for storing, retrieving, versioning, and auto-rotating credentials and API keys.
secrets-rotationaj-geddes/useful-ai-prompts461 installsAutomated rotation for API keys, database credentials, TLS certificates, and encryption keys with zero-downtime cutover.
secrets-managementwshobson/agents13.8K installsSecrets management patterns for CI/CD using Vault, AWS Secrets Manager, and native platform stores, without hardcoded credentials.
env-secrets-manageralirezarezvani/claude-skills698 installsEnv and secrets hygiene for local and production, from auditing .env files to planning rotation.
securing-s3-bucketsaws/agent-toolkit-for-aws7.7K installsGuided S3 bucket hardening covering creation, audits, remediation, encryption, and monitoring with AWS best practices.
secrets-vault-manageralirezarezvani/claude-skills710 installsVault, cloud secret stores, and dynamic credentials for services and operators, covering rotation and audit.