Iot Core: problem to connect my device

0

Hello, I am starting with AWS Iot Core. I use the MQTT protocol.

I did create my Device on the account, as well as its shadow and embedded the 3 certificates: AmazonRootCA1.pem, <MyDeviceName>.cert.pem, and <MyDeviceName>.private.key

When I try to connect, each of these certificates seems to be well recognized by my API functions, (I'm not using the AWS SDK, I'm using the Azure RTOS APIs... provided by my device's microcontroller manufacturer)

However the TLS session seems to start correctly, the "ClientHello" transaction seems to start well with a successful first handshake, but the connection breaks without me being able to find the reason.

Namely, my code was adapted for AWS IOT Core, because it originally worked for Azure IT Hub...

I hope someone here can help me?

Thanks in advance,

Best Regards, Eric F.

질문됨 일 년 전537회 조회
3개 답변
2
수락된 답변

You need to check whether the policy attached to that certificate allows the device to perform the operation your code is doing on the necessary resources. Assuming you're publishing into a specific topic, the policy needs to allow an iot:Publish action on that topic (or covered by a wildcard).

profile pictureAWS
전문가
Tasio
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전
1

Hello Eric,

you should enable logging for IoT Core. Then you might find information about what happens in CloudWatch logs.

You should also validate the IoT policy attached to your device certificate. If the MQTT client violates this policy, for example by sending a not permitted client ID it will be disconnected.

Cheers,
Philipp

AWS
전문가
답변함 일 년 전
0

Thank you both for your quick answers. I had not actually attached my certificates to the policy I created... Regards, Eric

답변함 일 년 전

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

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

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