Skip to content

Feature request: Missing parser type for IoT Core events #5891

@basvandriel

Description

@basvandriel

Use case

On AWS IoT, you can configure registry events, which send messages to MQTT topics on for example creation, updating or deletion of things.

This generates the underneath format.

{
    "eventType" : "THING_EVENT",
    "eventId" : "f5ae9b94-8b8e-4d8e-8c8f-b3266dd89853",
    "timestamp" : 1234567890123,
    "operation" : "CREATED|UPDATED|DELETED",
    "accountId" : "123456789012",
    "thingId" : "b604f69c-aa9a-4d4a-829e-c480e958a0b5",
    "thingName" : "MyThing",
    "versionNumber" : 1,
    "thingTypeName" : null,
    "attributes": {
                "attribute3": "value3",
                "attribute1": "value1",
                "attribute2": "value2"
    }
}

This can be useful when developing lambda functions getting triggered by these events.

@event_parser
def handle(event: IoTCRUDEvent, _: LambdaContext):
    ...

Solution/User Experience

Implement the AWSIoTCRUDEvent so it's typed.

Alternative solutions

Acknowledgment

Metadata

Metadata

Assignees

Labels

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions