Closed rlbartle closed 6 years ago
This seems like a AWS Lambda issue but I will ask: How exactly are you connecting to AWS IoT?
Using boto3.
import boto3
...
client = boto3.client("iot-data", "us-east-2")
client.get_thing_shadow()
In the meantime, I am able to have it running by using the 2.7 runtime and including the functools32 package which is needed by jsonschema.
I saw this as a warning in the CloudWatch logs but it did not prevent me from using Python 3.6 in my Lambda to access iot-data via Boto3. Closing.
I get the same error when using the Lambda Python3.6 runtime + IoT:
/var/task/botocore/handlers.py:697: UnsupportedTLSVersionWarning: Currently installed openssl version: OpenSSL 1.0.0-fips 29 Mar 2010 does not support TLS 1.2, which is required for use of iot-data. Please use python installed with openssl version 1.0.1 or higher.
Initialized with:
client = boto3.client('iot-data', 'us-east-1')
client.publish(topic=topic, qos=0, payload=data)
As discussed on AWS Forums, the python 3.6 runtime used here, uses OpenSSL 1.0.0-fips, which doesn't support TLS 1.2 which is necessary in order to connect with AWS IoT.
This affects the usefulness of the sample because after successfully running the lambda sample, developers expect to be able to extend it to support loading endpoints dynamically according to their own design. ie. With DynamoDB and IoT, users and things are associated, and the lambda function will determine what things the Alexa authorized user has access to and display them. That is the next logical implementation step, but this issue blocks that.