Serverless Maven Plugin
The Serverless Maven Plugin lets you define an entire serverless application as a single, cloud-agnostic JSON configuration and deploy it straight from your Maven build. Describe the components you want — websites, APIs, functions, databases, authentication, messaging, and more — and the plugin provisions the underlying cloud resources, wires up the permissions between them, verifies their health, and tears them down again, all as ordinary Maven goals.
One configuration file. One build tool. Deploy the same application to AWS, Azure, or GCP by changing a single provider field.
What It Can Do
Components You Can Deploy
Component | What it provisions |
|---|---|
Static site with CDN and path-based storage routing. | |
Object storage buckets, with optional artifact uploads. | |
HTTP REST APIs and real-time WebSocket APIs backed by functions. | |
Serverless functions with a dedicated execution identity and explicit permissions. | |
Serverless NoSQL tables. | |
A managed user identity provider with groups and users. | |
Transactional email sending. | |
Transactional SMS sending. | |
Asynchronous pub/sub event routing between functions. | |
Web application firewall with geo detection and country-based access control. |
How It Works
You write a configuration file (by default src/main/serverless/config.json) describing your application, its target provider, and the regions and components to deploy. Relationships between components are declared as links, and the plugin translates each link into the exact permissions the source component needs on the target. Running a Maven goal then drives the lifecycle:
Goal | Description |
|---|---|
serverless:validate | Parse and validate the configuration. |
serverless:plan | Diff the desired state against what is deployed. |
serverless:deploy | Provision and wire up all components. |
serverless:verify | Health-check the deployed resources. |
serverless:undeploy | Tear everything down. |
Where to Go Next
- Getting Started — install the plugin and deploy your first application.
- Configuration Reference — every field, the component model, and full examples.
- Credentials — configure cloud provider access.
- Architecture — how the plugin is built: modules, the deploy pipeline, and diagrams.
- Sample Project — a complete working example you can download.