Create a new customer-managed policy from JSON.
Section: IAM Policies
Create a managed policy
bash
bash
aws iam create-policy --policy-name ReadOnlyS3 --policy-document file://readonly-s3-policy.jsonExplanation
Managed policies can be attached to users, groups, and roles.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing IAM Policies
Get policy document version
Read the JSON document for a specific policy version.
Attach a managed policy to a role
Grant a role the permissions from a managed policy.
Simulate effective permissions
Test whether a principal can perform an action on a resource.