Receive Slack notifications when you get new orders on Amazon marketplaces.
Based on Serverless and uses Python 3.8
The entire stack can be hosted using the AWS free tier (Always Free offer) unless you exceed the limits but it's pretty hard to do so 😅
- Lambda (used to connect to MWS and call the Slack webhook)
- EventBridge (used to schedule Lambda to periodically check MWS)
- DynamoDB (used to store order data retrieved from MWS)
- Systems Manager (used to store MWS credentials and Slack webhook URL)
Connects to MWS and retrieves new orders. Scheduled to run every 5 minutes.
Invoked on new DynamoDB events and calls the Slack webhook when INSERT is detected.
Also updates the corresponding DB entry with notified: true or failed: true on Slack webhook POST failure.
Partition key: order_id
Sort key: -
- order_id: String [S]
- purchase_date: String [S]
- product_asin: String [S]
- order_qty: Number [N]
- order: Map
- order_items: Map
- notified: Boolean [BOOL]
- failed: Boolean [BOOL]
-
Get your MWS credentials https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Registering.html
Example:
SELLER_ID: A3XXXXXXXXXXFF
ACCESS_KEY: AKXXXXXXXXXXXXXXXXRQ
SECRET_KEY: ShT7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXEqm -
Get the marketplaces/regions you sell in https://docs.developer.amazonservices.com/en_US/dev_guide/DG_Endpoints.html
Example:
US: ATVPDKIKX0DER
CA: A2EUQ1WTGCTBG2 -
Get your incoming webhook https://slack.com/apps/A0F7XDUAZ-incoming-webhooks
Example:
https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
- Install serverless https://www.serverless.com/framework/docs/getting-started
- Add your MWS credentials and Slack webhook (from Prerequisites, Step 1 & 2) in Systems Manager -> Parameter
Store

- Customize regions in serverless.yml under MWS_MARKET_ID (should be a list!) from Prerequisites, Step 2
- Customize AWS region in serverless.yml under region (default is us-east-1)
- Deploy the stack by running
serverless deploy - Enjoy your notifications in Slack 🎉
