I had the same issue and spent hours trying to figure it out. Then I read on github that it was due to missing permission. The error code generated is confusing but if you check the logs you'll see that some permission were missing.
https://github.com/aws/aws-iot-device-sdk-python-v2/discussions/329