Setting up Amazon SQS - Amazon Simple Queue Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Setting up Amazon SQS

Before you can use Amazon SQS for the first time, you must complete the following steps.

Step 1: Create an Amazon Web Services account

To access any Amazon service, you first need to create an Amazon Web Services account, an Amazon.com account that can use Amazon products. You can use your Amazon Web Services account to view your activity and usage reports and to manage authentication and access.

To avoid using your Amazon Web Services account root user for Amazon SQS actions, it is a best practice to create an IAM user for each person who needs administrative access to Amazon SQS.

To set up a new account

  1. Open https://portal.amazonaws.cn/billing/signup.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

Step 2: Create an IAM user

To create an administrator user for yourself and add the user to an administrators group (console)

  1. Sign in to the IAM console as the account owner by choosing Root user and entering your Amazon Web Services account email address. On the next page, enter your password.

    Note

    We strongly recommend that you adhere to the best practice of using the Administrator IAM user that follows and securely lock away the root user credentials. Sign in as the root user only to perform a few account and service management tasks.

  2. In the navigation pane, choose Users and then choose Add users.

  3. For User name, enter Administrator.

  4. Select the check box next to Amazon Web Services Management Console access. Then select Custom password, and then enter your new password in the text box.

  5. (Optional) By default, Amazon requires the new user to create a new password when first signing in. You can clear the check box next to User must create a new password at next sign-in to allow the new user to reset their password after they sign in.

  6. Choose Next: Permissions.

  7. Under Set permissions, choose Add user to group.

  8. Choose Create group.

  9. In the Create group dialog box, for Group name enter Administrators.

  10. Choose Filter policies, and then select Amazon managed - job function to filter the table contents.

  11. In the policy list, select the check box for AdministratorAccess. Then choose Create group.

    Note

    You must activate IAM user and role access to Billing before you can use the AdministratorAccess permissions to access the Amazon Billing and Cost Management console. To do this, follow the instructions in step 1 of the tutorial about delegating access to the billing console.

  12. Back in the list of groups, select the check box for your new group. Choose Refresh if necessary to see the group in the list.

  13. Choose Next: Tags.

  14. (Optional) Add metadata to the user by attaching tags as key-value pairs. For more information about using tags in IAM, see Tagging IAM entities in the IAM User Guide.

  15. Choose Next: Review to see the list of group memberships to be added to the new user. When you are ready to proceed, choose Create user.

You can use this same process to create more groups and users and to give your users access to your Amazon Web Services account resources. To learn about using policies that restrict user permissions to specific Amazon resources, see Access management and Example policies.

Step 3: Get your access key ID and secret access key

To use Amazon SQS actions (for example, using Java or through the Amazon Command Line Interface), you need an access key ID and a secret access key.

Note

The access key ID and secret access key are specific to Amazon Identity and Access Management. Don't confuse them with credentials for other Amazon services, such as Amazon EC2 key pairs.

Access keys consist of an access key ID and secret access key, which are used to sign programmatic requests that you make to Amazon. If you don't have access keys, you can create them from the Amazon Web Services Management Console. As a best practice, do not use the Amazon Web Services account root user access keys for any task where it's not required. Instead, create a new administrator IAM user with access keys for yourself.

The only time that you can view or download the secret access key is when you create the keys. You cannot recover them later. However, you can create new access keys at any time. You must also have permissions to perform the required IAM actions. For more information, see Permissions required to access IAM resources in the IAM User Guide.

To create access keys for an IAM user

  1. Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/.

  2. In the navigation pane, choose Users.

  3. Choose the name of the user whose access keys you want to create, and then choose the Security credentials tab.

  4. In the Access keys section, choose Create access key.

  5. To view the new access key pair, choose Show. You will not have access to the secret access key again after this dialog box closes. Your credentials will look something like this:

    • Access key ID: AKIAIOSFODNN7EXAMPLE

    • Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

  6. To download the key pair, choose Download .csv file. Store the keys in a secure location. You will not have access to the secret access key again after this dialog box closes.

    Keep the keys confidential in order to protect your Amazon Web Services account and never email them. Do not share them outside your organization, even if an inquiry appears to come from Amazon or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key.

  7. After you download the .csv file, choose Close. When you create an access key, the key pair is active by default, and you can use the pair right away.

Related topics

Step 4: Get ready to use the example code

This guide includes examples that use the Amazon SDK for Java. To run the example code, follow the set-up instructions in Getting Started with Amazon SDK for Java 2.0.

You can develop Amazon applications in other programming languages, such as Go, JavaScript, Python and Ruby. For more information, see Tools for developing and managing applications on Amazon.

Note

You can explore Amazon SQS without writing code with tools such as the Amazon Command Line Interface (Amazon CLI) or Windows PowerShell. You can find Amazon CLI examples in the Amazon SQS section of the Amazon CLI Command Reference. You can find Windows PowerShell examples in the Amazon Simple Queue Service section of the Amazon Tools for PowerShell Cmdlet Reference.

Next steps

You are now ready for Getting started with managing Amazon SQS queues and messages using the Amazon Web Services Management Console.