Skip to content

Windingflow/ServerlessAS2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServerlessAS2 Logo

Open-source AS2 EDI gateway powered by AWS serverless

WebsiteDocumentationQuick StartCommunity

License GitHub Stars


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.

Why ServerlessAS2?

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

Features

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.

100% Serverless Architecture

  • 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

Quick Start

Deploy ServerlessAS2 to your AWS account with a single command in AWS CloudShell:

curl -fsSL https://serverlessas2.io/install.sh | bash

The 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.

Architecture

ServerlessAS2 Architecture

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

Cost Comparison

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+

Documentation


Development

Want to contribute or run ServerlessAS2 locally? Follow the setup below.

Prerequisites

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

Clone the Repository

git clone https://github.com/Windingflow/ServerlessAS2.git
cd ServerlessAS2

Project Structure

serverlessas2/
├── 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

Deploy to AWS

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

Running Tests

# Backend unit tests
cd backend && mvn test

# Frontend linting
cd frontend && npm run lint

Contributing

We welcome contributions of all kinds!

How to Contribute

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/your-feature-name
  3. Make your changes
  4. Test your changes locally
  5. Commit with a clear message
    git commit -m "feat: add support for async MDN"
  6. Push to your fork
    git push origin feature/your-feature-name
  7. Open a Pull Request

Commit Convention

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

What to Contribute

  • Bug fixes
  • New features (please open an issue first to discuss)
  • Documentation improvements
  • Test coverage
  • Performance optimizations

See open issues for ideas.


Community

Acknowledgements

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.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.


serverlessas2.io

About

One command from zero to production. The only open source, serverless-native AS2 gateway — deploy to your own AWS account in 15 minutes, production-proven with major trading partners, zero monthly minimums.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors