Skip to main content

Policy

Creates and manages IAM policies that define permissions for AWS services and resources. Supports automatic versioning and updates when policy content changes.

Props

PolicyDocument
required
Policy document defining the permissions.
string
Name of the policy.Default: ${app}-${stage}-${id}
string
Optional description of the policy’s purpose.
string
Optional path prefix for the policy.
Record<string, string>
Optional resource tags.

Output

string
ARN of the policy.
string
Name of the Policy.
string
ID of the default policy version.
number
Number of entities the policy is attached to.
Date
When the policy was created.
Date
When the policy was last updated.
boolean
Whether the policy can be attached to IAM users/roles.

PolicyDocument Type

A PolicyDocument is an object with the following structure:

Examples

Basic S3 bucket access policy

Policy with multiple statements and conditions

Policy that denies access based on tags