Event notifications for Amazon IoT Wireless
Amazon IoT Wireless can publish messages to notify you of events for LoRaWAN and Sidewalk devices that you onboard to Amazon IoT Core. For example, you can be notified of events such as when the Sidewalk devices in your account have been provisioned or registered.
How your resources can be notified of events
Event notifications are published when certain events occur. For example, events are generated when your Sidewalk device is provisioned. Each event causes a single event notification to be sent. Event notifications are published over MQTT with a JSON payload. The content of the payload depends on the type of event.
Note
Event notifications are published at least once. It's possible for them to be published more than once. The ordering of event notifications is not guaranteed.
Events and resource types
The following table shows the different types of events for which you'll receive notifications. The event types depend on whether the resource type is a wireless device, a wireless gateway, or a Sidewalk account. You can also enable events for your resources at the resource level, which applies to all resources of a particular type, or for select resources, as described in the following section. For more information about the different event types, see Event notifications for LoRaWAN resources and Event notifications for Sidewalk resources.
Event types based on resources | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Resource | Resource type | Event type | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wireless device | LoRaWAN | Join | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sidewalk |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wireless gateway | LoRaWAN | Connection status | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sidewalk account | Sidewalk |
|
Policy for receiving wireless event notifications
To receive event notifications, your IAM role or user must use an appropriate policy that allows it to connect to the Amazon IoT device gateway and subscribe to MQTT event topics. You must also subscribe to the appropriate topic filters.
The following is an example of the policy required for receiving notifications for the various wireless events.
{ "Version":"2012-10-17", "Statement":[{ "Effect":"Allow", "Action":"iot:Subscribe", "Resource":[ "arn:aws:iot:
region
:account
:topicfilter/$aws/iotwireless/events/join/*", "arn:aws:iot:region
:account
:topicfilter/$aws/iotwireless/events/connection_status/*", "arn:aws:iot:region
:account
:topicfilter/$aws/iotwireless/events/device_registration_state/*", "arn:aws:iot:region
:account
:topicfilter/$aws/iotwireless/events/proximity/*", "arn:aws:iot:region
:account
:topicfilter/$aws/iotwireless/events/message_delivery_status/*" ] }, { "Effect":"Allow", "Action":"iot:Receive", "Resource":[ "arn:aws:iot:region
:account
:topic/$aws/iotwireless/events/join/*", "arn:aws:iot:region
:account
:topic/$aws/iotwireless/events/connection_status/*", "arn:aws:iot:region
:account
:topic/$aws/iotwireless/events/device_registration_state/*", "arn:aws:iot:region
:account
:topic/$aws/iotwireless/events/proximity/*", "arn:aws:iot:region
:account
:topic/$aws/iotwireless/events/message_delivery_status/*" ] }] }
Format of MQTT topics for wireless events
To send you notifications of events for your wireless resources, Amazon IoT uses MQTT reserved topics that begin with a dollar sign ($). You can publish and subscribe to these reserved topics. However, you can't create new topics that begin with a dollar sign.
Note
MQTT topics are specific to your Amazon Web Services account and use the format
arn:aws:iotwireless:
.
For more information, see MQTT topics.aws-region:Amazon-account-ID
:topic/Topic
Reserved MQTT topics for wireless devices use the following format:
-
Resource-level topics
These topics apply to all resources of a particular type in your Amazon Web Services account that you've onboarded to Amazon IoT Wireless.
$aws/iotwireless/events/{eventName}/{eventType}/{resourceType}/resources
-
Identifier-level topics
These topics apply to select resources of a particular type in your Amazon Web Services account that you've onboarded to Amazon IoT Wireless, specified by the resource identifier.
$aws/iotwireless/events/{eventName}/{eventType}/{resourceType}/{resourceIdentifierType}/{resourceID}/{id}
For more information about topics at resource and identifier levels, see Event configurations.
The following table shows examples of MQTT topics for the various events:
Events and MQTT topics | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Event | MQTT topic | Notes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sidewalk device registration state |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sidewalk proximity |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sidewalk message delivery status |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LoRaWAN join |
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LoRaWAN gateway connection status |
|
|
For more information about the different events, see Event notifications for LoRaWAN resources and Event notifications for Sidewalk resources.
If you've subscribed to these topics, you'll be notified when a message is published to one of the event notification topics. For more information, see Reserved topics.
Pricing for wireless events
For information about pricing for subscribing to events and for receiving
notifications, see Amazon IoT Core
pricing