Problem connecting to AWS IoT

Hello!
We are trying to connect our device to AWS IoT Cloud but we fail in authentication.
The error is as follows:
mbedtls_ssl_conf_alpn_protocols returned -0x7100
We are providing correct user name and password.
Also we checked our endpoind - it is correct also.
Would you please advice.
Thank you!