Setting up Amazon MQ - Amazon MQ

Setting up Amazon MQ

Before you can use Amazon MQ, you must complete the following steps.

Step 1: create an AWS account and an IAM administrator user

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

  1. Navigate to the AWS home page, and then choose Create an Amazon Web Services ]Account.

  2. Follow the instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phone keypad.

  3. When you finish creating your AWS account, follow the instructions in the IAM User Guide to create your first IAM administrator user and group.

Step 2: create an IAM user and get your AWS credentials

To avoid using your IAM administrator user for Amazon MQ operations, it is a best practice to create an IAM user for each person who needs administrative access to Amazon MQ.

To work with Amazon MQ, you need the AmazonMQFullAccess policy and AWS credentials that are associated with your IAM user. These credentials are comprised of an access key ID and a secret access key. For more information, see What is IAM? in the IAM User Guide and AWS Security credentials in the AWS General Reference.

  1. Sign in to the AWS Identity and Access Management console.

  2. Choose Users, Add user.

  3. Type a User name, such as AmazonMQAdmin.

  4. Select Programmatic access and AWS Management Console access.

  5. Set a Console password and then choose Next: Permissions.

  6. On the Set permissions for AmazonMQAdmin page, choose Attach existing policies directly.

  7. Type AmazonMQ into the filter, choose AmazonMQFullAccess, and then choose Next: Review.

  8. On the Review page, choose Create user.

    The IAM user is created and the Access key ID is displayed, for example:


  9. To display your Secret access key, choose Show, for example:



    You can view or download your secret access key only when you create your credentials (however, you can create new credentials at any time).

  10. To download your credentials, choose Download .csv. Keep this file in a secure location.

Step 3: get ready to use the example codes

The following tutorials show how you can work with Amazon MQ brokers using the AWS Management Console as well as how to connect to your Amazon MQ for ActiveMQ and Amazon MQ for RabbitMQ brokers programatically. To use the ActiveMQ Java example code, you must install the Java Standard Edition Development Kit and make some changes to the code.

You can also create and manage brokers programmatically using Amazon MQ REST API and AWS SDKs.

Next steps

Now that you're prepared to work with Amazon MQ, get started by creating a broker. Depending on your broker engine type, you can then connect a Java application to your Amazon MQ for ActiveMQ broker or use the RabbitMQ Java client library to connect a JVM-based application to your Amazon MQ for RabbitMQ broker.