This topic describes how to authorize a Resource Access Management (RAM) user to access Message Service (MNS).

Procedure

  1. Log on to the RAM console by using an Alibaba Cloud account.
  2. In the left-side navigation pane, click Users under Identities.
  3. In the User Logon Name/Display Name column, find the RAM user.
  4. Click Add Permissions. On the page that appears, the Principal field is automatically filled in.
  5. In the Policy Name column, select the policies that you want to attach to the RAM user.
    Note You can click the cross sign (×) next to a policy in the Selected section to delete the policy.
  6. Click OK.
  7. Click Finished.

What to do next

Use the RAM user to access MNS.
  1. Download the latest version of the SDK for Python to the server and decompress the package.
  2. Open the sample.cfg file in the mns_python_sdk directory, and specify the AccessKey pair (AccessKey ID and AccessKey secret) of the RAM user and the MNS endpoint of the Alibaba Cloud account.
  3. Run the python sample.py command.

    If no error is returned, the AccessKey pair of the RAM user can be used to access MNS queues that are created by the Alibaba Cloud account.