How to trigger ıot events with lambda

77 views Asked by At

I have a aws ıot events model. I have to trigger that model with using lambda ptyhon functions, like <if this happens, trigger the model like>.

So, how can ı trigger ıot events model with using lambda

1

There are 1 answers

0
shahharshil46 On

Assuming your model is listening for a data from an Input, you can invoke the BatchPutMessage API from Lambda code.

Refer here for documentation.

response = client.batch_put_message(
    messages=[
        {
            'messageId': 'string',
            'inputName': 'string',
            'payload': b'bytes',
            'timestamp': {
                'timeInMillis': 123
            }
        },
    ]
)