iot-device-simulator icon indicating copy to clipboard operation
iot-device-simulator copied to clipboard

Change MQTT Destination to use GreenGrass Core Device

Open devin-patterson opened this issue 4 years ago • 3 comments

I have a use case to change the destination for MQTT messages for the simulated devices. The ideal scenario would be to make this configurable. As of now, it seems it delivers to IoT Core dynamically pulling the address. I would like to plugin this address and port, allowing for example to use GreenGrass as a destination for the device messages.

devin-patterson avatar Aug 09 '21 16:08 devin-patterson

Hi @devin-patterson currently there is no way to modify the endpoint as it is obtained in the ECS Fargate tasks, and there is no way to modify the image used for those tasks. We are currently exploring using Lambda instead of ECS, which will make it possible to change the endpoint directly in the Lambda function itself.

G-Lenz avatar Aug 19 '21 17:08 G-Lenz

George,

Thank you very much for the response. Is there any way to hard code a different endpoint before deploying for example to use a Greengrass destination? Appreciate any help.

Regards,

Devin

On Thu, Aug 19, 2021 at 1:47 PM George Lenz @.***> wrote:

Hi @devin-patterson https://github.com/devin-patterson currently there is no way to modify the endpoint as it is obtained in the ECS Fargate tasks, and there is no way to modify the image used for those tasks. We are currently exploring using Lambda instead of ECS, which will make it possible to change the endpoint directly in the Lambda function itself.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awslabs/iot-device-simulator/issues/26#issuecomment-902116966, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZ23A4MK3T74VKSOXFEXZ3T5U7ULANCNFSM5B2LF3BQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

devin-patterson avatar Aug 19 '21 19:08 devin-patterson

@devin-patterson Currently the only way possible to do it would require building your own docker image. The files needed for the image are in the source/simulator folder. You would have to change the endpoint in source/simulator/index.js to point to your own endpoint. After that, you would have to build the image and host it on your own, and then change the ECS task definition to point to your new container image.

G-Lenz avatar Aug 23 '21 18:08 G-Lenz