Create an LwA Security Profile
Create an SNS Topic
I: Implement DRS
The Dash Replenishment Service (DRS) uses SNS Topics to notify you (the device maker) of changes to device status, order state, subscription status, and more.
Amazon's Simple Notification Service (SNS) is a pub-sub service from AWS that makes it easy to set up, manage, and send messages instantly to applications or users. See Notification Messages for a complete list of supported DRS notifications.
- Create an SNS Topic for DRS
- Allow DRS to Publish Messages to Your Topic
- Process incoming notifications
Create an SNS Topic for DRS
- Log in to the AWS Management Console.
- Select Simple Notification Service from Application Integration
- From the SNS Dashboard, click Create topic.
- Enter a Topic name and Display name, then click Create topic.
Note: Choose a friendly Topic Name and Display Name to improve code readability.
- Topic Name - Used to create a permanent unique identifier called an Amazon Resource Name (ARN), which will be used to configure your SNS Notifications.
Allow DRS to Publish Messages to Your Topic
Copy the ARN you just created. You will use this to link DRS-enabled devices to your new topic in step 6.
- Click the ARN for the topic you've created.
- Click Other topic actions and then click Edit topic policy.
- From Basic View, under Allow these users to publish messages to this topic, select Only these AWS user and enter your AWS Account ID and the DRS AWS Account ID.
- To access your AWS Account ID, go to the AWS Console.
- Enter the following for the DRS AWS Account ID:
- Click Update policy.
- Go to your DRS Self-Service portal and paste the ARN you copied in step 1 in the "Notification" field under "App Settings".
Process incoming notifications
You have completed the tutorial!
If you wish to perform any task upon receiving an SNS notification, the next section provides an overview of the messages you will receive.
You may choose to trigger a Lambda function to update a database or create custom routines in your cloud.