Name and document policies
Choose consistent policy identifiers, file names, display names, and customer-facing descriptions.
File Names and Policy IDs
Use lowercase directory names with hyphens between words. Keep reserved filenames such as folder.yaml, policy.yaml, and prod.logic.yaml unchanged.
A policy ID is the absolute repository path to its directory, using forward slashes and no trailing slash. Moving the directory changes the ID; changing a display name does not. See Repository Structure and Structure a custom policy.
Display Names
Describe the resource, relevant feature, and issue. For example, AWS Support Role is not created identifies a resource and its missing configuration.
In names, use full for a standalone label and contextual where the surrounding hierarchy supplies context. Keep names specific enough to distinguish similar checks. A display name describes the issue a policy detects; it does not assert that every evaluated resource has that issue.
Descriptions and Rationale
Keep the descriptor's description to one or two plain-text sentences. State the expected configuration and why it matters. Explain the benefit of addressing the issue or the consequence of leaving it unresolved. Mention the evaluated feature when context is necessary.
For best practices, explain when the recommendation applies rather than presenting every recommendation as a universal requirement.
Detailed Documentation and Remediation
Use description.md for the fuller explanation:
| Section | Include |
|---|---|
| Description | Expected configuration and evaluated functionality |
| Rationale | Justification, benefits, and applicability considerations |
| Impact | Risks of the issue and consequences of remediation |
| Audit | Verification procedures and how to interpret results |
| References | Supporting standards, vendor guidance, or internal requirements |
Put corrective steps in remediation.md, including relevant console or CLI procedures. Keep both files consistent with the executable check and explain important limitations. See Read policy details to compare documentation, logic, and evidence.
Review a Built-in Example
The support-role example separates identification from explanation:
| Item | Example |
|---|---|
| Directory | ce/ca/aws/account/aws-support-role |
| Policy ID | /ce/ca/aws/account/aws-support-role |
| Display name | AWS Support Role is not created |
| Requirement summary | Provide an IAM role with suitable permissions for authorized users to manage AWS Support incidents. |
Before review, check that the name, summary, audit instructions, remediation, and test expectations describe the same requirement. Validate metadata against your repository's current schemas; editorial conventions alone do not establish schema validity.