aws-iot-device-sdk-python-v2 | Next generation AWS IoT Client SDK for Python | AWS library
kandi X-RAY | aws-iot-device-sdk-python-v2 Summary
kandi X-RAY | aws-iot-device-sdk-python-v2 Summary
This document provides information about the AWS IoT Device SDK v2 for Python. If you have any issues or feature requests, please file an issue or pull request. This SDK is built on the AWS Common Runtime, a collection of libraries (aws-c-common, aws-c-io, aws-c-mqtt, aws-c-compression, aws-c-http, aws-c-cal, aws-c-auth, s2n ...) written in C to be cross-platform, high-performance, secure, and reliable. The libraries are bound to Python by the awscrt package (PyPI) (Github).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get credentials and launch them
- Create a get secret value operation
- Get secret value
- Get a secret value
- Discover a thing
- Create a DiscoverResponse object from a payload
- Construct a GGGCore instance from a payload
- Create a GGroup object from a dict
- Subscribe to an update job
- Subscribe to a getNamedShadow subscription request
- Subscribe to updateNamedShadow subscription
- Subscribe to a named shadowDelta
- Subscribe to named shadow updated events
- Subscribe to a delete_shadow subscription request
- Subscribe to a describe job
- Subscribe to update job execution
- Subscribe to a DescribeJobExecutionRequest
- Subscribe to a given request
- Subscribe to update shadow subscription
- Subscribe to a deleted shadow subscription
- Create a TLS connection with the given pkcs11
- Creates a connection using a direct connection
- Create a websocket connection
- Called when a get shadow is received
- Create a Greengrass Core instance
- Delete an IOT thing
aws-iot-device-sdk-python-v2 Key Features
aws-iot-device-sdk-python-v2 Examples and Code Snippets
Community Discussions
Trending Discussions on aws-iot-device-sdk-python-v2
QUESTION
In a python application that uses the aws iot device sdk for python v2 (v1.7.1) I am running into an issue where I cannot update the device shadow.
After starting the program, the DeviceShadowManager
will attempt to get the latest shadow state and set it locally.
If a delta
state is present the DeviceShadowManager
will merge the last reported
state and delta
state and publish it.
That works. However, when the manager subscribes for updates, after the initial setup, I am running into an error,
where when the desired
state changes, the manager cannot update the reported
state. Here is the error:
ANSWER
Answered 2021-Oct-25 at 09:24I am pretty sure the problem lies within
QUESTION
I'm trying to connect to AWS IoT Core via aws-iot-sdk-js-v2 and receiving the following error when I'm running the PubSub example as described below:
...ANSWER
Answered 2021-Jun-23 at 07:48I received an answer in aws-iot-device-sdk-js-v2 repository from jmklix that solved my problem:
Currently, the maintainers of the package don't include the pre-compiled binaries for raspberry pi, but we can do this manually if we want. described in aws-crt-nodejs:
QUESTION
I'm setting up an AWS IoT MQTT connection from a Python environment using Python package awsiotsdk
. I have followed this example https://github.com/aws/aws-iot-device-sdk-python-v2/blob/main/samples/pubsub.py and gotten the demo publish/subscribe to work, so I have all the pieces.
The only difference from the demo is that in my environment the certificates all reside in memory rather than on disk. A hack solution would be to write them to a temp location on disk and follow the example.
I would prefer to simply instantiate the appropriate AWS authentication class which can accept a file-like object rather than a string filename. However following the code only leads me to c-binding dead ends.
How can I create an MQTT client using in-memory certificates?
...ANSWER
Answered 2021-Jan-31 at 01:43As far as I've been able to determine, this is simply not possible. My solution is to use the tempfile
package to create a temporary directory which I write the cert to and then reference when I create my MQTT client. It's not elegant, but it keeps me from needing to manage the certs as an external dependency (which is what I wanted to avoid).
QUESTION
I'm following the pubsub.py
example code for AWS IoT using MQTT here. In particular I'm connecting to MQTT using the awsiotsdk
.
That example works ok, but it connects to MQTT as a generic client, not as a specific device.
I would like to connect to MQTT to publish and subscribe as a specific device. In particular I want to be able to query for connected devices and see this device show up.
In the demo code I see that --client-id
is included. By default it uses a UUID to generate a unique client ID for the demo. I've tried setting the client-id
to the thing ARN arn:aws:iot:us-west-2:123456789012:thing/test
What I want/expect to see is the following search show the connected thing
. The query comes back empty while the pubsub demo is running. The fact that it's empty tells me that the pubsub example is connecting as an MQTT client, not as a device. How do I connect as a device?
ANSWER
Answered 2021-Jan-26 at 00:07The clientId must equal the Thing name of a Thing registered in the Registry.
The connectivity status data is indexed only for connections where the client ID has a matching thing name.
https://docs.aws.amazon.com/iot/latest/developerguide/aggregation-troubleshooting.html
QUESTION
I'm following the example pub/sub in awsiotsdk
.
ANSWER
Answered 2021-Jan-22 at 22:44EXACTLY_ONCE
(MQTT QOS level 2) is not currently supported by the AWS IoT Core server. This is mentioned in the source:
QUESTION
I'm creating an AwsCredentialsProvider
class (api docs) from:
ANSWER
Answered 2021-Jan-22 at 16:19For custom credentials file path set environment variables AWS_CONFIG_FILE
and AWS_CREDENTIAL_FILE
For default profile set environment variable AWS_PROFILE
with AWS profile name you would like to select as default. In order to use at runtime, this AWS profile name must be present in your AWS credentials file with valid configurations.
If you use only one AWS region, then you can also set environment variable AWS_DEFAULT_REGION
. At times it saves few lines of code, where you might need to specify a AWS region.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-iot-device-sdk-python-v2
CMake 3.1+
Python headers and libs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page