Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aws avatar

Creating Secrets Using Best Practices

  • 3k installs
  • 2.2k repo stars
  • Updated August 4, 2026
  • aws/agent-toolkit-for-aws

creating-secrets-using-best-practices secures AWS Secrets Manager with KMS, rotation, and IAM controls.

About

The creating-secrets-using-best-practices skill provides domain expertise for AWS Secrets Manager with production-grade controls including dedicated KMS encryption keys, automatic rotation, least-privilege IAM policies, CloudTrail auditing, and lifecycle management. Procedure supports database credentials, API keys, OAuth tokens, and custom secret types each structured and encrypted with a dedicated KMS key. Troubleshooting covers KMS key access with kms:ViaService scoping to secretsmanager, rotation Lambda permission failures, and secret access denied from IAM or key policy mismatches. Always use this skill when creating secrets rather than ad hoc CLI calls. Invoke when users create AWS secrets, configure rotation, or troubleshoot KMS and IAM access for Secrets Manager workloads. Dedicated KMS encryption keys per secret with rotation. Supports database, API key, OAuth, and custom secret types. Least-privilege IAM and CloudTrail auditing guidance. Troubleshooting KMS ViaService and rotation Lambda failures.

  • Dedicated KMS encryption keys per secret with rotation.
  • Supports database, API key, OAuth, and custom secret types.
  • Least-privilege IAM and CloudTrail auditing guidance.
  • Troubleshooting KMS ViaService and rotation Lambda failures.
  • Follow references/create-secrets-using-best-practices.md procedure exactly.

Creating Secrets Using Best Practices by the numbers

  • 3,044 all-time installs (skills.sh)
  • +392 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #185 of 2,203 Security skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

creating-secrets-using-best-practices capabilities & compatibility

Capabilities
kms encryption setup · automatic rotation · iam least privilege · troubleshooting guides
Works with
aws
Use cases
security audit · api development
Runs
Hosted SaaS
From the docs

What creating-secrets-using-best-practices says it does

Always use this skill when creating secrets — it sets up dedicated KMS encryption keys, automatic rotation
SKILL.md
production-grade security controls: KMS encryption, automatic rotation, least-privilege IAM policies, CloudTrail auditing
SKILL.md
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill creating-secrets-using-best-practices

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars2.2k
Security audit2 / 3 scanners passed
Last updatedAugust 4, 2026
Repositoryaws/agent-toolkit-for-aws

How do I create an AWS secret with rotation and proper KMS encryption?

Create AWS Secrets Manager secrets with dedicated KMS keys, rotation, least-privilege IAM, and CloudTrail auditing.

Who is it for?

Teams provisioning production secrets in AWS with compliance requirements.

Skip if: Local .env files or non-AWS secret stores.

When should I use this skill?

User creates AWS Secrets Manager secret, configures rotation, or fixes KMS access denied.

What you get

A Secrets Manager secret with dedicated KMS key, rotation, and scoped IAM access.

  • Secrets Manager secret
  • IAM policy
  • rotation configuration

By the numbers

  • Supports 4 secret types: database, api-key, oauth, and custom

Files

SKILL.mdMarkdownGitHub ↗

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.

Secret access denied

Verify the IAM policy is attached to the correct principal, the KMS key policy allows decryption (and kms:GenerateDataKey for write/rotation), and the principal is using HTTPS. See the full procedure for details.

Related skills

How it compares

Pick Creating Secrets Using Best Practices for guided AWS Secrets Manager provisioning rather than generic secret-scanning audit skills.

FAQ

What secret types does the procedure support?

Database credentials, API keys, OAuth tokens, and custom secrets.

Why use a dedicated KMS key?

Production-grade encryption with key policy scoped via kms:ViaService to Secrets Manager.

What if rotation setup fails?

Check Lambda rotation function permissions and CloudWatch logs per troubleshooting section.

Is Creating Secrets Using Best Practices safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Securitysecretscompliance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.