TLS Handshake failure while connecting to mqtt broker

Hello Everyone,
I am developing TI’s EFM32 series micro controller based IOT device. This device will connect to mqtt broker and publish/ subscribes to/from data.

In my application, I am trying to connect to AWS using mbedtls library over lwIP (no rtos mode). While my device is in debug mode (i.e. JTAG programmer connected) then it gets connected to AWS successfully. But when I remove JTAG programmer and operate device in normal running mode, then it failed to get connect to broker (i.e. AWS).

I observe following errors occured while performing TLS handshaking stage:

SSL - The connection indicated an EOF
X509 - Certificate verification failed, e.g. CRL, CA or signatur
SSL - Processing of the ServerHello handshake message failed