Monitoring Amazon One Enterprise events in Amazon EventBridge
You can monitor Amazon One Enterprise events in EventBridge, which delivers a stream of real-time data from your own applications, software-as-a-service (SaaS) applications, and AWS services. EventBridge routes that data to targets such as AWS Lambda and Amazon Simple Notification Service. These events deliver a near real-time stream of system events that describe changes in AWS resources.
Subscribe to Amazon One Enterprise events
Amazon One device and user profile status change events are published using EventBridge, and can be enabled in the EventBridge console by creating a new rule. Although events are not ordered, they have a timestamp which enables you to consume the data. Events are emitted on a best effort basis.
To subscribe to Amazon One Enterprise events
-
Open the EventBridge console at https://console.aws.amazon.com/events/
. -
In the navigation pane, under Buses, choose Rules.
-
Choose Create rule.
-
On the Default rule detail page, assign a name to the rule, choose Rule with an event pattern, and then choose Next.
-
On the Build event pattern page, under Event source, verify that AWS events or EventBridge partner events is selected.
-
Under Sample event type, choose Enter my own.
-
Copy and paste from one of the Sample events.
-
For Creation method, choose Custom pattern. In the Event pattern section, add a JSON with event source as
aws:one
and the required detail-type, and then choose Next. -
On the Select target(s) page, select a target of your choice, which includes a Lambda function, SQS queue, or SNS topic. For information about configuring targets, see Amazon EventBridge targets.
-
Optionally, you can configure tags.
-
On the Review and create page, choose Create rule. For more information about configuring rules, see EventBridge rules in the EventBridge User Guide.
Device status change event types
Device status change events are generated in JSON. For each event type, a JSON blob is sent to the target of your choice, as configured in the rule. The following detail types are available:
- Device Health Status Changed To Healthy
-
Device passed all health checks.
- Device Health Status Changed To Critical
-
Device failed one or more health checks.
- Device Connectivity Changed To Offline
-
Device is not connected to the internet.
- Device Connectivity Changed To Online
-
Device is connected to the internet.
Event Objects
- resources
-
Contains the list of deviceInstance arn for which the Device Status Change event was published.
- metadata
-
siteName
-
Name of the site where the deviceInstance is present.
siteArn
-
Arn for the site where the deviceInstance is present.
-
- data
-
currentConnectivity
-
Represents whether the deviceInstance is connected to or disconnected from the internet.
-
Possible values: CONNECTED, DISCONNECTED
previousConnectivity
-
Represents whether the deviceInstance was connected to or disconnected from the internet before the event.
-
Possible values: CONNECTED, DISCONNECTED
currentHealthStatus
-
Represents whether the deviceInstance has passed all health checks.
-
Possible values: HEALTHY, CRITICAL
previousHealthStatus
-
Represents whether the deviceInstance passed all health checks when last checked.
-
Possible values: HEALTHY, CRITICAL
assetTagId
-
The assetTagId of the device associated with the deviceInstance.
deviceInstanceName
-
The name of the deviceInstance for which the Device Status Event was published.
-
User profile event types
The User profile related event details types are:
- New Successful Enrollment
-
When a user enrolled successfully.
- New Successful Un-enrollment
-
When a user un-enrolled successfully.
- Unsuccessful Enrollment
-
When a user failed to enroll.
- Unsuccessful Un-enrollment
-
When a user failed to un-enroll.
- Successful Recognition
-
When a user scans palm for authentication successfully.
- Unsuccessful Recognition
-
When the recognition of a palm scan failed.
Event Objects
- resources
-
Contains the list of user profile arn for which the user profile event was published.
- data
-
accountId
-
The relevant AWS account for the device that initiated the request.
requestSource
-
This is the deviceInstanceId of the device that initiated the request.
createdTimestamp
-
The time of event being created.
userStatus
-
The current status of the user.
-
Possible values: ACTIVE, DELETED
associatedId
-
The associated id of the user, for example the badge id.
reason
-
This value will present for unsuccessful events. It contains the reason why the event was unsuccessful.
-
Sample events
The following examples show events for Amazon One Enterprise.
Topics
Device health status changed to healthy
The device passed all the health and the device instance health status changed to HEALTHY from CRITICAL health status.
{ "version": "0", "id": "11232345564-96a4-ef3f-b739-b6aa5b193afb", "detail-type": "Device Health Status Changed To Healthy", "source": "aws.one", "account": "123456789012", "time": "2022-10-22T18:43:48Z", "region": "us-east-1", "resources": ["arn:aws:one:us-east-1:123456789012:device-instance/12345678901234"], "detail": { "version": "1.0.0", "metadata": { "siteName": "Site name", "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234" }, "data": { "currentHealthStatus": "HEALTHY", "previousHealthStatus": "CRITICAL", "assetTagId": "0000195169", "deviceInstanceName": "Device name" } } }
Device health status changed to critical
The device failed one or more health checks and the device instance health status changed to CRITICAL from HEALTHY.
{ "version": "0", "id": "11232345564-96a4-ef3f-b739-b6aa5b193afb", "detail-type": "Device Health Status Changed To Critical", "source": "aws.one", "account": "123456789012", "time": "2022-10-22T18:43:48Z", "region": "us-east-1", "resources": ["arn:aws:one:us-east-1:123456789012:device-instance/12345678901234"], "detail": { "version": "1.0.0", "metadata": { "siteName": "Site name", "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234" }, "data": { "currentHealthStatus": "CRITICAL", "previousHealthStatus": "HEALTHY", "assetTagId": "0000195169", "deviceInstanceName": "Device name" } } }
Device connectivity changed to online
The device is connected to the internet and the connectivity status of the device instance changed to CONNECTED from DISCONNECTED.
{ "version": "0", "id": "11232345564-96a4-ef3f-b739-b6aa5b193afb", "detail-type": "Device Connectivity Changed To Online", "source": "aws.one", "account": "123456789012", "time": "2022-10-22T18:43:48Z", "region": "us-east-1", "resources": ["arn:aws:one:us-east-1:123456789012:device-instance/12345678901234"], "detail": { "version": "1.0.0", "metadata": { "siteName": "Site name", "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234" }, "data": { "currentConnectivity": "CONNECTED", "previousConnectivity": "DISCONNECTED", "assetTagId": "0000195169", "deviceInstanceName": "Device name" } } }
Device connectivity changed to offline
The device is not connected to the internet and the connectivity status of the device instance changed to DISCONNECTED from CONNECTED.
{ "version": "0", "id": "11232345564-96a4-ef3f-b739-b6aa5b193afb", "detail-type": "Device Connectivity Changed To Offline", "source": "aws.one", "account": "123456789012", "time": "2022-10-22T18:43:48Z", "region": "us-east-1", "resources": ["arn:aws:one:us-east-1:123456789012:device-instance/12345678901234"], "detail": { "version": "1.0.0", "metadata": { "siteName": "Site name", "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234" }, "data": { "currentConnectivity": "DISCONNECTED", "previousConnectivity": "CONNECTED", "assetTagId": "0000195169", "deviceInstanceName": "Device name" } } }
New successful enrollment
An event when an user has enrolled successfully.
{ "version": "0", "id": "aebc9c86-f20e-75db-caaa-63bf14926f59", "detail-type": "New Successful Enrollment", "source": "aws.one", "account": "679792848029", "time": "2023-11-22T02:55:17Z", "region": "us-east-1", "resources": [ "arn:aws:one:us-east-1:679792848029:user" ], "detail": { "version": "1.0.0", "data": { "accountId": "679792848029", "enrollmentSource": "QfUuUnFqs5accJ", "createdTimestamp": "2023-11-22T02:55:17Z", "userStatus": "ACTIVE", "associatedIds": "[{\"associatedIdType\":\"badge\",\"associatedIdValue\":\"1111358294500\"}]", } } }