This project provides a sample solution that integrates Amazon SP-API Notifications with an event-driven, multi-cloud pipeline using AWS services and Java.
It enables scalable, secure, and extensible subscription-based processing for Amazon sellers across internal workflows, webhook targets, and cross-platform destinations like GCP Pub/Sub and Azure Service Bus.
See also from the README in other language:
This solution helps you explore how to integrate SP-API Notifications into your own system—whether you're just starting out, or building advanced multi-cloud workflows.
See USAGE_GUIDE.md for step-by-step use cases and implementation examples.
- Subscribe and unsubscribe to SP-API notifications via Lambda
- Forward events to:
- AWS SQS / EventBridge
- GCP Pub/Sub
- Azure Storage Queue / Azure Service Bus
- HTTP Webhooks (with optional auth headers)
- Internal event processing using Step Functions
- Secure credential storage in AWS Secrets Manager
- Fully automated deployment with CDK and Bash scripts
src/SPAPINotificationsSampleSolution/
│
├── app/ # Runtime configuration, deployment logic
│ ├── config/ # App config files & examples
│ │ ├── app-config.json
│ │ ├── notification-type-definition.json
│ │ └── example/ # Example of app-config.json for all the process variation
│ ├── scripts/ # Bash-based deployment logic
│ │ ├── java/
│ │ ├── shared/
│ │ └── iam-policy.json
│ ├── sp-api-app-cdk/ # AWS CDK infrastructure (TypeScript)
│ │ ├── lib/
│ │ ├── bin/
│ │ ├── package.json
│ │ └── tsconfig.json
│ ├── step-functions/ # StepFunction definition JSONs
│ │ └── order-change-step-functions-workflow-definition.json
│ └── tools/ # Secrets setup scripts for GCP, Azure
│ ├── aws/ # Helper tools to create aws resources
│ ├── gcp/ # Helper tools to generate GCP KEY SecretsManager
│ └── azure/ # Helper tools to generate AZURE KEY SecretsManager
│
├── code/java/ # Java Lambda source code
│ ├── pom.xml # Maven config
│ └── src/main/java/lambda/
│ ├── common/ # Shared constants, models, credentials
│ ├── subscription/ # Subscribe/Unsubscribe Lambda handlers
│ ├── process/ # Notification processors (internal/webhook/crossplatform)
│ └── utils/ # SecretsManager, StepFunctions helpers
│
├── docs/ # Documentation
│ ├── DEPLOYMENT.md # Main deployment guide (EN)
│ ├── DEPLOYMENT_JP.md # 日本語版デプロイ手順
│ └── secret-example.csv # Sample credentials CSV
- DEPLOYMENT.md – English deployment guide
- Install prerequisites: AWS CLI, Node.js (14+), Maven, GitBash (Windows), jq
- Register your SP-API app: Register your app
- Configure: Edit
app/config/app-config.jsonand prepareclient_secrets.csv - Deploy:
cd app/scripts/java bash java-app.sh - Subscribe: After deployment, trigger
SPAPISubscribeNotificationsLambdaFunction-<suffix>from AWS Console or CLI
| Component | Description |
|---|---|
| Secrets Manager | Stores SP-API refresh tokens and seller IDs |
| Lambda (Java) | Handles subscription, processing, forwarding, DLQ handling |
| SQS/EventBridge | Receives and routes notifications internally or to external systems |
| Step Functions | Orchestrates internal workflows |
| Dynamo DB | DynamoDB to store subscription and credentials information |
| CDK (TypeScript) | Provisions all AWS infrastructure based on app-config.json input |
{
"NotificationTypes": ["ORDER_CHANGE", "LISTINGS_ITEM_MFN_QUANTITY_CHANGE"],
"SellerIds": ["SELLERID123", "SELLERID456"]
}Invoke: SPAPISubscribeNotificationsLambdaFunction-<suffix>
- DEPLOYMENT.md – Setup & Deployment Guide
- secret-example.csv – Example seller credential format
- notification-type-definition.json – All available notification types
To remove all provisioned AWS resources:
bash java-app-clean.shThis deletes Lambda functions, SQS queues, secrets, Step Functions, and CDK stack.
- Written in Java 17 with Maven
- Lambda handlers located under
lambda.subscription,lambda.process,lambda.utils - Compatible with multi-seller registration and retry/DLQ processing
- Secrets chunked if oversized for AWS SecretsManager