Updated on 2024-08-15 GMT+08:00

Granting an IAM User the Permissions to Create and List Buckets

Scenario

This topic describes how to grant an IAM user the permissions to create and list buckets. An IAM user with this permission can create and list buckets. The created buckets are owned by the account of the IAM user. The IAM user can also view all buckets under the account.

Recommended Configuration Method

Permissions to create and list buckets are OBS-level permissions. You are advised to configure custom policies on the IAM.

Procedure

  1. Log in to Huawei Cloud and click Console in the upper right corner.
  2. On the console, hover your cursor over the username in the upper right corner, and choose Identity and Access Management from the drop-down list.
  3. In the navigation pane, choose Permissions > Policies/Roles > Create Custom Policy.
  4. Configure a custom policy.

    Figure 1 Configuring a custom policy
    Table 1 Parameters for configuring a custom policy

    Parameter

    Description

    Policy Name

    Enter a policy name.

    Policy View

    Set this parameter based on your own habits. Visual editor is used here.

    Policy Content

    • Select Allow.
    • Select Object Storage Service (OBS).
    • Select obs:bucket:CreateBucket from ReadWrite actions and obs:bucket:ListAllMyBuckets from ListOnly actions.
    • Select All for resources.

    Scope

    Use the default value Global services.

  5. Click OK.
  6. Create a user group and assign permissions.

    Apply the created custom policy to the user group by following the instructions in the IAM document.

  7. Add the IAM user you want to authorize to the created user group by referring to Adding Users to or Removing Users from a User Group.

    Due to data caching, it takes about 10 to 15 minutes for a custom policy to take effect.