Using Lambda with python to comunicate with AWS Iot Core

0

Hello, i have been reading a lot of documentation, but its taking too much time and still can't find what i need. I need to use several lamda fucntions to do different things with IoT Core. First i need to add and remove lora gateways and devices invoking the lambda function from a php (the invoking part shouldn't be a problem). Second i need to send data to the device through a lambda function. Basically how to implement AWS python SDK in lambda.

the motive is that I don't want to have and EC2 instance for this and the php should have the lower load possible.

Nico
질문됨 일 년 전521회 조회
2개 답변
0

Depending in your solution, but most gateways run with the GreenGrass software from aws iot. You can run this on rpi or similar instances. And make a bridge between mqtt and device protocol.

You van manage this with the api call's, but you load them with certificates and they will automatic connect and register to the iot core and subsrcribe to topics.

For data communication from lambda, you can publish messages with python: https://aws.amazon.com/premiumsupport/knowledge-center/iot-core-publish-mqtt-messages-python/

If you want to run a php frontend, you have two options. Either communicatie directly from php to mqtt. Or create an api gateway with lambda's and connect your php with the rest api of the api gateway.

답변함 일 년 전
0

You mean AWS python SDK or AWS IoT device sdk python ?

If its AWS Python SDK, you can use iot wireless api operations (boto3)

To add/remove the lora gateway and devices, there are api operations create_wireless_device(),
create_wireless_gateway(),
delete_wireless_device(),
delete_wireless_gateway()

To send the data back to the lora device,
send_data_to_wireless_device() - https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iotwireless.html#IoTWireless.Client.create_wireless_device

If you are talking about AWS IoT device sdk python, there is no api operations for iotwireless yet.

AWS
전문가
sunrise
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠