-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClientToken is limited to 64 bytes #28
Comments
Below code is my sample of solution. When creating a device shadow object, a prefix can be set manually. This code works on my project. |
Thanks @rkawajiri for your interest in AWS IoT SDK. Yes, you are correct. There is no check for the length of client token. Thanks for your effort of pulling request. However, we do not normally directly take PR through github. AWS IoT has its own internal process of releasing but we do give people credit if we take their code into the release. Thanks again, |
@fengsongAWS I have one question. Is there a documentation about the limitation of the client token? |
Unfortunately, there's no documentation about the client token for now which is supposed to be I think. Some SDK e.g. Node.js already dealt with this case while some haven't. You can find more about AWS IoT limit here. AWS IoT Limit |
Any update on this issue? I'm getting "ERRORCODE:400 MESSAGE:invalid client token" from AWSIoTLogs in CloudWatch. I think the error is caused by SDK generating client token longer than 64 bytes. Is there a way to confirm? I have the client token from debug logs. |
Addressed in v1.1.2. |
I cannot find documentations about the limits of client token (e.g. http://docs.aws.amazon.com/iot/latest/developerguide/iot-limits.html, http://docs.aws.amazon.com/iot/latest/developerguide/thing-shadow-document.html#client-token ). However, based on my try-and-error with AWS IoT Console, the length of client token seems to be limited to 64 bytes.
Below code generating client token does not check the length of client token. So, shadow request sometimes causes errors, when client id and/or shadow name are too long.
https://github.com/aws/aws-iot-device-sdk-python/blob/master/AWSIoTPythonSDK/core/shadow/deviceShadow.py#L32-L35
The text was updated successfully, but these errors were encountered: