creating-secrets-using-best-practices

Manage AWS Secrets Manager secrets with KMS encryption, rotation, and IAM policies.

2|Updated May 15, 2026
One-click install
npx skills add https://github.com/mashharuki/floci-sample --skill creating-secrets-using-best-practices-mashharuki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-secrets-using-best-practices
Source: https://github.com/mashharuki/floci-sample/tree/main/.agents/skills/creating-secrets-using-best-practices
Command: npx skills add https://github.com/mashharuki/floci-sample --skill creating-secrets-using-best-practices-mashharuki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures the secure creation and management of AWS Secrets Manager secrets, reducing security risks by following best practices such as encryption, rotation, and auditing.

Core Features & Use Cases

  • Secure Secret Creation: Utilizes KMS encryption for secrets, ensuring they are protected at rest.
  • Automated Rotation: Configures automatic rotation policies for secrets, reducing the risk of compromised credentials.
  • Least Privilege Access: Sets up IAM policies to follow the principle of least privilege, ensuring only necessary permissions are granted.
  • Audit Trails: Enforces CloudTrail logging for secret management operations, enabling traceability and compliance.
  • Lifecycle Management: Provides lifecycle management features, including tags and deletion policies for secret resources.
  • Use Case: Use this Skill to create and manage sensitive database credentials in AWS Secrets Manager, ensuring they are always encrypted, rotated, and securely managed.

Quick Start

Use the 'create-secrets-using-best-practices' skill to create a new secret with encryption and rotation in AWS Secrets Manager.

Frequently Asked Questions about creating-secrets-using-best-practices

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

FAQPage Schema
How do I securely create AWS Secrets Manager secrets with KMS encryption?

To securely create AWS Secrets Manager secrets with KMS encryption, you must define the secret payload, specify a KMS key for encryption at rest, and apply least privilege IAM policies to restrict access. This ensures secrets are protected immediately upon creation.

What's the best way to configure automatic secret rotation for database credentials?

The best way to configure secret rotation for database credentials in AWS Secrets Manager is to establish an automatic rotation policy. This automatically updates credentials at defined intervals, significantly reducing the risk of compromised static credentials in production environments.

How do I enforce least privilege IAM policies for accessing AWS Secrets Manager?

You can enforce least privilege IAM policies for AWS Secrets Manager by explicitly restricting permissions to only the necessary secret management actions. This ensures only authorized entities can access or modify specific secrets, minimizing security risks.

Can I use AWS CloudTrail auditing to track Secrets Manager operations?

Yes, you can use AWS CloudTrail auditing to track Secrets Manager operations. Enforcing CloudTrail logging enables traceability for all secret management operations, ensuring compliance and providing a complete audit trail of secret access and lifecycle events.

Does AWS Secrets Manager lifecycle management support tags and deletion policies for API keys?

Yes, AWS Secrets Manager lifecycle management supports tags and deletion policies for API keys and OAuth tokens. This allows you to properly categorize, track, and securely schedule the deletion of secret resources throughout their lifecycle.