Hi CK. I have this particular board. Yes, the WiFi socket connection is being closed unexpectedly. What have you setup in IoT Core? I suspect the issue is probably in the cloud configuration. Is the device certificate registered and activated? Do you have an IoT policy attached to it that permits connection? Could you perhaps share the policy here?
I'm not clear what instructions you're following from the name "Connect to AWS IoT - STM32-B-L475E-IOT01A". Can you please paste the link?
UPDATE: the logs show that a new cert/key is being auto provisioned after 180s. These values will be used in preference to the values configured in aws_clientcredential_keys.h. Therefore the device is attempting connection with a different certificate than the one that has been registered in IoT Core. Hence the failure. I tested the demo on my board - it works fine and does not do the auto provisioning by default. Please check your build settings (as detailed in the comments) and re-build your binary.
How to connect to AWS IoT Core using AWS Embedded SDK from coreMQTT library using mbedTLSasked 2 months ago
How to establish connection between Unity and AWS DynamoDB for WebGL platform ?asked 4 months ago
Cannot run Sample Project at iPhone - I see only black screenAccepted Answerasked 5 years ago
AWS Corretto sample application S3KeyAccepted Answerasked a month ago
Can I split an AWS Direct Connect connection and assign specific bandwidths to different resources?Accepted Answerasked 2 years ago
Can you use the FreeRTOS OTA Agent without using AWS IoT?Accepted Answerasked 2 years ago
FreeRtos sample for STM32_L475E_IOT01A cannot establish connectionasked 2 months ago
Linux instance has failed its instance check and I cannot connect to itAccepted Answerasked 8 months ago
Exception Running the Sample GameLift Code from AWSAccepted Answerasked 2 years ago
Error while try to connect to DB using jdbcasked 2 months ago