Open-source AS2 EDI gateway powered by AWS serverless
Website • Documentation • Quick Start • Community
ServerlessAS2 is a fully serverless implementation of the AS2 (Applicability Statement 2) protocol for secure B2B document exchange. Deploy your own AS2 gateway on AWS with zero server management, automatic scaling, and pay-per-use pricing.
| Pain Point | ServerlessAS2 Solution |
|---|---|
| High monthly minimums | $0 on Free Tier; pay only for what you use |
| Complex, time-consuming setup | One command, 15 minutes — ready to trade |
| Manual XML configuration | Web UI for everything — pure point-and-click |
| Certificate management headaches | Centralized UI with expiration tracking |
| Difficult to scale | Auto-scales with automatic capacity |
| Vendor lock-in | Open source, runs on your AWS account — you own it |
|
One-Command Setup Single command deploys everything. 15 minutes from zero to production. |
Free on AWS Free Tier $0/month for low volume. Pay only when processing messages. |
Web UI Manage partners, certificates, and transactions visually. No XML configs. |
Production-Proven Battle-tested with major trading partners across retail, logistics, healthcare, and finance. |
- Auto-scales to thousands of messages per second
- Built-in HA with Lambda + DynamoDB redundancy
- Multi-region capable for global disaster recovery
- Zero maintenance - fully managed AWS services
Deploy ServerlessAS2 to your AWS account with a single command in AWS CloudShell:
curl -fsSL https://serverlessas2.io/install.sh | bashThe installer will:
- Check prerequisites (AWS CLI, Node.js, Java, Maven)
- Configure your AWS region and settings
- Deploy all infrastructure via CDK
- Output your AS2 endpoint URL and admin console link
For manual installation or custom configurations, see Deploy to AWS.
| Component | Service | Purpose |
|---|---|---|
| Frontend | CloudFront + S3 | Static web hosting for Vue.js admin console |
| Authentication | Cognito User Pool | User authentication and authorization |
| Backend API | API Gateway + Lambda | RESTful API for management operations |
| Database | DynamoDB | Store partners, certificates, partnerships, logs |
| Async Jobs | SQS + Lambda | Background processing for AS2 message delivery |
| Logging | CloudWatch Logs | Centralized logging and monitoring |
| Infrastructure | AWS CDK | Infrastructure as Code deployment |
| Solution | Monthly Cost (Low Volume) | Monthly Cost (1000 msgs/day) |
|---|---|---|
| ServerlessAS2 | $0 (free tier) | ~$1-3 |
| AWS Transfer Family AS2 | $220+ (always-on) | ~$500+ |
| OpenAS2 on EC2 | ~$15-30 (t3.small 24/7) | $30+ |
| Commercial SaaS | $500-2000+ | $500-2000+ |
Want to contribute or run ServerlessAS2 locally? Follow the setup below.
| Tool | Version | Check |
|---|---|---|
| Node.js | 18+ | node --version |
| Java | 17+ | java --version |
| Maven | 3.8+ | mvn --version |
| AWS CLI | 2.x | aws --version |
| AWS CDK | 2.x | cdk --version |
git clone https://github.com/Windingflow/ServerlessAS2.git
cd ServerlessAS2serverlessas2/
├── backend/ # Java 17 + Quarkus Lambda functions
│ ├── src/main/java/com/windingflow/lambda/
│ │ ├── handler/ # Lambda entry points
│ │ ├── service/ # Business logic
│ │ ├── pojo/ # Data models
│ │ └── component/ # AWS SDK integrations
│ └── pom.xml
├── frontend/ # Vue 3 + TypeScript admin console
│ ├── src/
│ │ ├── views/ # Page components
│ │ ├── api/ # Axios API client
│ │ ├── router/ # Vue Router
│ │ └── store/ # Vuex state management
│ └── package.json
├── cdk/ # AWS CDK infrastructure (Java)
│ └── src/main/java/com/myorg/
│ ├── ResourceNames.java # Centralized resource naming
│ ├── ManageLambdaStack.java
│ ├── AS2ReceiverLambdaStack.java
│ ├── S3EventLambdaStack.java
│ ├── SQSLambdaStack.java
│ └── FrontendDeploymentStack.java
└── deploy.sh # Deployment script
The deploy.sh script handles the full deployment: building backend, bootstrapping CDK, and deploying all stacks.
# In AWS CloudShell (auto-detects account/region)
./deploy.sh
# Specify account and region explicitly
./deploy.sh -a 123456789012 -r us-west-1
# With environment (dev, staging, prod)
./deploy.sh -a 123456789012 -r us-west-1 -e staging
# With AWS profile
./deploy.sh -p my-profile
# Non-interactive mode (for CI/CD)
./deploy.sh -y
# Combine options
./deploy.sh -a 123456789012 -r us-west-1 -e prod -p my-profile -y| Option | Description |
|---|---|
-a, --account |
AWS Account ID (auto-detected in CloudShell) |
-r, --region |
AWS Region (auto-detected from AWS_REGION) |
-e, --environment |
Environment name: dev, staging, prod (default: dev) |
-p, --profile |
AWS CLI profile (for SSO, run aws sso login --profile <name> first) |
-y, --yes |
Skip confirmation prompts |
-q, --quiet |
Less verbose output |
The script will auto-install Maven if missing (Amazon Linux, RHEL, Ubuntu, Debian, macOS).
Deploy individual stacks manually:
cd cdk
cdk deploy ManageLambdaStack-dev-us-west-1
cdk deploy AS2ReceiverLambdaStack-dev-us-west-1
cdk deploy SQSLambdaStack-dev-us-west-1
cdk deploy S3EventLambdaStack-dev-us-west-1
cdk deploy FrontendDeploymentStack-dev-us-west-1# Backend unit tests
cd backend && mvn test
# Frontend linting
cd frontend && npm run lintWe welcome contributions of all kinds!
- Fork the repository
- Create a feature branch
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes locally
- Commit with a clear message
git commit -m "feat: add support for async MDN" - Push to your fork
git push origin feature/your-feature-name
- Open a Pull Request
We use Conventional Commits:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or updating tests |
chore |
Maintenance tasks |
- Bug fixes
- New features (please open an issue first to discuss)
- Documentation improvements
- Test coverage
- Performance optimizations
See open issues for ideas.
- GitHub Discussions - Questions & ideas
- GitHub Issues - Bug reports & feature requests
This project is built on top of OpenAS2, the excellent open-source Java implementation of the AS2 protocol. We're grateful to the OpenAS2 community for their years of work building a robust, production-ready AS2 library.
ServerlessAS2 wraps OpenAS2's core protocol handling and extends it with:
- AWS Lambda-native execution
- Serverless infrastructure via CDK
- Modern web-based management console
- Cloud-native storage and queuing
If you find ServerlessAS2 useful, please also consider starring OpenAS2.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
