AmazonMQ MQTT quickstart "forbidden" error

0

I have created an MQTT broker following the getting started steps https://us-east-1.console.aws.amazon.com/amazon-mq/home?region=us-east-1#/brokers/new, with: Apache ActiveMQ, single-instance, mq.t3.micro. Inbound rules allow public access for the console (:8162) and mqtt (:8883) connections, and I've successfully logged into the console.

But when I try to connect to the broker and publish using a Python paho mqtt client, I get a "connected with result code 5" error, meaning "forbidden".

I tried editing the broker configuration file to add a <simpleAuthenticationPlugin> to configure client usernames and passwords, but the editor stripped it out:

Your XML has been sanitized. Invalid and unsupported XML elements and attributes have been removed.Info Element: simpleAuthenticationPlugin Reason: Unsupported element.

EDIT: Messages can be published and received using the web console admin username/password. But the "Getting Started" provided no information on how to configure and authenticate individual clients. What is the easiest way to allow a few individual clients to connect to a micro broker?

질문됨 일 년 전140회 조회
1개 답변
0

Hi Ron, I realize you asked this question a long time ago, but wanted to provide an answer here in case others also have the same questions.
1/ I would guess that your connection error is either caused by the client not supporting / using TLS (which is why the port is 8883 instead of the non-TLS 1883), or the wrong username/password being provided by the client.

2/ For adding additional users, you use the AmazonMQ console for ActiveMQ. You can add additional users towards the bottom of the configuration page. This is not done within the broker config file as you would do on a self-hosted ActiveMQ instance, and as you saw if you try to edit the config the XML will be stripped out. More info here on permitted configuration elements: https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/permitted-elements.html

BR, Chris

AWS
Chris C
답변함 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인