AWS IoT Core mqtt connection using username and password

0

Is there a way to make a mqtt connection with username and password instead of doing it using the certificates?

질문됨 2달 전146회 조회
1개 답변
1

Hi there!

Yes, username and password are supported through custom authorizers. This uses an AWS Lambda function to evaluate the provided username and password and it returns either an allow or deny for the connection. You can find specifics here, and here is a sample in GitHub that demonstrates this feature.

Please let me know if this answers your question (accept answer), or if you require more clarification please comment.

AWS
Gavin_A
답변함 2달 전
profile pictureAWS
전문가
Greg_B
검토됨 2달 전
  • Thank you for your answer. I am still having problems with the connection using username and password. First of all, I created the lambda function. After that, I created the authorizer just adding the lambda function and activating it. I added the invokeFunction permission in Lambda too using the arn of the authorizer. I then tried to make the connection. Lambda doesn't give me any error. However, when connecting the node red to AWS with the username, password, port 443, endpoint and topic i can't send the message.

  • Custom authentication with username/password requires also setting the ALPN TLS extension and setting the SNI value. Node-RED's MQTT components provide for this via the tls-config config node, set the ALPN Protocol field to mqtt (details here). Also set the Server Name field to the custom authorizer fully qualified domain name.

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

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

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

관련 콘텐츠