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.

gefragt vor einem Jahr537 Aufrufe
3 Antworten
2
Akzeptierte Antwort

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
EXPERTE
Tasio
beantwortet vor einem Jahr
profile pictureAWS
EXPERTE
überprüft vor einem Jahr
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
EXPERTE
beantwortet vor einem Jahr
0

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

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen