-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Describe the bug
Using these commands for the url and certs:
aws iot describe-endpoint --endpoint-type iot:Data-ATS --region ...
aws iot create-keys-and-certificate --set-as-active --certificate-pem-outfile {HOME}/temp/certificate.pem.crt --private-key-outfile {HOME}/temp/private.pem.key --region ...
Doing chmod 600 for *.key, 644 for *.crt and 400 for *.pem the call:
mqtt_connection = mqtt_connection_builder.mtls_from_path(
endpoint=IOT_ENDPOINT,
cert_filepath=f"{HOME}/temp/certificate.pem.crt",
pri_key_filepath=f"{HOME}/temp/private.pem.key",
client_id=f"{random.random()}",
)
continues to fail with:
File "/Users/willspies/Desktop/dump-dynamo/gateway-venv/lib/python3.10/site-packages/awscrt/io.py", line 616, in init
self._binding = _awscrt.client_tls_ctx_new(
RuntimeError: 1038 (AWS_IO_FILE_VALIDATION_FAILURE): A file was read and the input did not match the expected value
Any help appreciated
Will
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
It succeeds
Current Behavior
Fails with
File "/Users/willspies/Desktop/dump-dynamo/gateway-venv/lib/python3.10/site-packages/awscrt/io.py", line 616, in init
self._binding = _awscrt.client_tls_ctx_new(
RuntimeError: 1038 (AWS_IO_FILE_VALIDATION_FAILURE): A file was read and the input did not match the expected value
Reproduction Steps
call mqtt_connection_builder.mtls_from_path
Possible Solution
No response
Additional Information/Context
awscrt 0.31.1
awsiotsdk 1.28.0
boto3 1.42.33
SDK version used
1.28.0
Environment details (OS name and version, etc.)
Ubuntu and Mac OS