Set up managed routes to control how IoT device messages are sent and received within a Hub
List routes
List all routes in the specified region. By default, returned routes are ordered by creation date in ascending order, though this can be modified via the order_by field.
path Parameters
regionThe region you want to target
query Parameters
pagePage number to return, from the paginated results.
page_sizeNumber of routes to return within a page. Maximum value is 100.
order_byOrdering of requested routes.
hub_idHub ID to filter for.
nameRoute name to filter for.
List routes › Responses
total_countTotal number of routes.
Page of routes.
Create a route
Multiple kinds of routes can be created, such as:
- Database Route Create a route that will record subscribed MQTT messages into your database. You need to manage the database by yourself.
- REST Route. Create a route that will call a REST API on received subscribed MQTT messages.
- Amazon S3 Routes.
Create a route that will put subscribed MQTT messages into an Object Storage bucket.
You need to create the bucket yourself and grant write access.
Granting can be done with s3cmd (
s3cmd setacl s3://<my-bucket> --acl-grant=write:555c69c3-87d0-4bf8-80f1-99a2f757d031:555c69c3-87d0-4bf8-80f1-99a2f757d031).
path Parameters
regionThe region you want to target
Create a route › Request Body
nameRoute name.
hub_idHub ID of the route.
topicTopic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.
If creating Amazon S3 Routes, Amazon S3-specific configuration fields.
If creating Database Route, DB-specific configuration fields.
If creating Rest Route, Rest-specific configuration fields.
Create a route › Responses
idRoute ID.
nameRoute name.
hub_idHub ID of the route.
topicTopic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.
typeRoute type.
created_atDate at which the route was created. (RFC 3339 format)
When using Amazon S3 Routes, Amazon S3-specific configuration fields.
When using Database Route, DB-specific configuration fields.
When using Rest Route, Rest-specific configuration fields.
updated_atDate at which the route was last updated. (RFC 3339 format)
regionRegion of the route.
Get a route
Get information for a particular route, specified by the route ID. The response returns full details of the route, including its type, the topic it subscribes to and its configuration.
path Parameters
regionThe region you want to target
route_idRoute ID.
Get a route › Responses
idRoute ID.
nameRoute name.
hub_idHub ID of the route.
topicTopic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.
typeRoute type.
created_atDate at which the route was created. (RFC 3339 format)
When using Amazon S3 Routes, Amazon S3-specific configuration fields.
When using Database Route, DB-specific configuration fields.
When using Rest Route, Rest-specific configuration fields.
updated_atDate at which the route was last updated. (RFC 3339 format)
regionRegion of the route.
Update a route
Update the parameters of an existing route, specified by its route ID.
path Parameters
regionThe region you want to target
route_idRoute id.
Update a route › Request Body
nameRoute name.
topicTopic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.
When updating Amazon S3 Route, Amazon S3-specific configuration fields.
When updating Database Route, DB-specific configuration fields.
When updating Rest Route, Rest-specific configuration fields.
Update a route › Responses
idRoute ID.
nameRoute name.
hub_idHub ID of the route.
topicTopic the route subscribes to. It must be a valid MQTT topic and up to 65535 characters.
typeRoute type.
created_atDate at which the route was created. (RFC 3339 format)
When using Amazon S3 Routes, Amazon S3-specific configuration fields.
When using Database Route, DB-specific configuration fields.
When using Rest Route, Rest-specific configuration fields.
updated_atDate at which the route was last updated. (RFC 3339 format)
regionRegion of the route.