Mongoose ESP32 AWS IOT keep disconnecting and reconnecting

Hello everyone,

It’s is the first time I use mongoose os for ESP32 to connect to AWS IOT, I use the sample code here https://github.com/cesanta/mongoose-os,

  1. Why are such of files like “aws-test.crt.pem” or “aws-test.key.pem” generated automatically?

And with one ESP32, the esp run normally, but with 2 ESP32 (use same IAM access key and secret access key) the keep reconnecting, so just recieve message when the are connected, when they are reconnecting i can’t recieve any message?
error
Could you please share me some information, I’m so tired.

Thank you so much!