Create a policy

Write a customer-managed policy, in the console's builder or as JSON, before you attach it to anyone.

Last updated 18 November 2026View as Markdown

A policy grants nothing until it is attached to a user, a group or a role. Replace S3ReadMyBucket with the policy's name and org-EXAMPLE1234 with your organization id. For the language itself, see Policy documents.

Prerequisites

  • Permission for iam:CreatePolicy.
  • In the console, also iam:ListPolicies: the Policies list, where Create policy is, shows nothing else without it.

Write the policy

  1. Open Identity, then choose Policies.
  2. Choose Create policy.
  3. For Policy name, enter S3ReadMyBucket. (Optional) For Description, say what it is for.
  4. Under Permissions, write the document in one of four tabs:
    • Quick: choose None, Read-only or Full per service. The result applies to every resource in the organization.
    • Statements: one or more statements, each with an effect, its actions and a Resource.
    • JSON: the document itself.
    • Templates: start from a managed policy's document and change it.
  5. Choose Create policy. The console returns to the list of policies.

Each tab submits what it shows. Leaving Quick or Statements copies what you built into the JSON tab.

Result

The policy is listed under Policies as a custom policy. Attach it to put it into effect; see Attach a policy.

If the policy is refused

The document is checked before it is stored. Refusals are 400 with the statement and the reason:

  • Invalid policy document: Invalid JSON
  • Invalid policy document: Statement[0] references unknown action "s3:GetObjekt": every action pattern must match at least one action.
  • Invalid policy document: Statement[0] has invalid resource "…": a resource is * or a resource name.
  • Invalid policy document: Statement[0].Condition.…: an operator or key outside the supported ones, or a value that cannot be read; see Policy documents.
  • 409 Quota exceeded: … when the organization has as many custom policies as its quota allows; see Quotas.
Did this page help you?