Another thing worth confirming is that you are using the MQTT Test Client of the same region as the endpoint your device is connecting to. There are a couple of ways to check this:
- The region name shown on top right of the AWS console should match the region name in the endpoint e.g. xxxxxxxxxxxx[.]iot[.]ap-south-1[.]amazonaws[.]com is the end point for the ap-south-1 region.
- You can subscribe to
$aws/events/presence/connected/#
using the MQTT Test Client and connect your device to the broker. If the region is the same the test client will show a new connection at this topic.