IoTEventsData / Client / batch_put_message



Sends a set of messages to the IoT Events system. Each message payload is transformed into the input you specify ( "inputName") and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn’t guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.

See also: AWS API Documentation

Request Syntax

response = client.batch_put_message(
            'messageId': 'string',
            'inputName': 'string',
            'payload': b'bytes',
            'timestamp': {
                'timeInMillis': 123

messages (list) –


The list of messages to send. Each message has the following format: '{ "messageId": "string", "inputName": "string", "payload": "string"}'

  • (dict) –

    Information about a message.

    • messageId (string) – [REQUIRED]

      The ID to assign to the message. Within each batch sent, each "messageId" must be unique.

    • inputName (string) – [REQUIRED]

      The name of the input into which the message payload is transformed.

    • payload (bytes) – [REQUIRED]

      The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).

    • timestamp (dict) –

      The timestamp associated with the message.

      • timeInMillis (integer) –

        The value of the timestamp, in the Unix epoch format.

Return type:



Response Syntax

    'BatchPutMessageErrorEntries': [
            'messageId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'

Response Structure

  • (dict) –

    • BatchPutMessageErrorEntries (list) –

      A list of any errors encountered when sending the messages.

      • (dict) –

        Contains information about the errors encountered.

        • messageId (string) –

          The ID of the message that caused the error. (See the value corresponding to the "messageId" key in the "message" object.)

        • errorCode (string) –

          The error code.

        • errorMessage (string) –

          A message that describes the error.