Unable to Connect a Client to MQTT Server

@herbert.pan-Q
Thank you for your response!
I will add & test it .Will let you know.

@herbert.pan-Q
I added SNI command. But still I am not able to connect to AWS IOT Core MQTT server. Connection opened successfully but client not connecting to server and received response as +QMTSTAT: 0,1.

I suggest that you first use mqtt.fx tool for verification, preliminary judgment may be caused by CA authentication failure

@herbert.pan-Q
Thank you so much for your response & help. Now I am able to connect to AWS IOT Core server. Also I am able to configure last will for IOT device without SSL ,now I have to do same with SSL. How to do that ?Any suggestion will be very helpful.

AT+QMTCFG=“will”,[,<will_fg>[,<will_qos>,<will_retain>,“<will_topic>”,“<will_msg>”]]
AT+QMTCFG=“will”,0,1,1,0,“will/topic”,xx

@herbert.pan-Q
Yes, I used above AT command for configuring last will .But this is working for without SSL. I want to configure same for AWS IOT Core (i.e. using SSL commands).I configured last will with SSL commands ,but I am unable to connect to AWS IOT core.