JAWS V1 (BETA)
JAWS is an open-source framework for building serverless applications (web, mobile, IoT) using Amazon Web Services' Lambda, API Gateway, and more. Lambda's event-driven model offers tremendous cost savings and colossal horizontal scaling ability. Now, JAWS helps you build and maintain entire applications built on Lambda.
Quick Start
-
$ npm install jaws-framework -g -
$ jaws new project
Note: We recommend camelCase for project names. Why?
-
$ cd <new-project-name> -
$ jaws module create users list -
$ jaws dash
This will create a new jaws project, create a lambda function with an API Gateway endpoint, which you can immediately deploy via
jaws dash. After deployment is complete, you will be given a url. In the above example, you can access your
deployed lambda at your_url/users/list.
Overview:
JAWS is a command line interface that provides structure, automation and optimization to help you build and maintain your serverless apps. JAWS uses AWS services exclusively, since it relies on AWS's Lambda service to provide event-driven compute resources, and many AWS services integrate nicely with Lambda.
In JAWS V1, we made a strong effort to make not just a groundbreaking serverless framework, but the best framework for building applications with AWS in general (that is also serverless!). As a result, JAWS V1 incorporates years of AWS expertise into its tooling, giving you best practices out-of-the-box.
A JAWS app can be simply a group of lambda functions to accomplish some tasks, or an entire back-end comprised of hundreds of lambda functions. All JAWS apps use the directory structure described in the diagram below. This scaffolding can be generated by running the jaws new project command.
Web, mobile and IoT applications can be built on JAWS, since JAWS is mostly a back-end focused framework. JAWS comes with a front folder, but doesn't do much with it (yet).
JAWS applications' back-end runs on AWS Lambda functions which can be seen in the back folder. To encourage the development of re-usable, standardized and optimized lambda functions, JAWS keeps all of your app's lambda functions in the AWS-Module (awsm) format. This format was created for JAWS, and the JAWS CLI features commands to help you generate scaffolding for your aws_modules.
Possibly the best feature of aws_modules is they make it easy for developers to publish and share their lambda functions and encourage a module ecosystem. In the near future, when you are building your serverless app, you will be able to select from a large variety of pre-written lambda functions, designed by the JAWS community for re-use, optimization, easy installation and deployment!
Every JAWS application can have multiple stages and multiple regions within each stage. JAWS relies heavily on AWS Cloudformation to keep track of all of the AWS resources your application requires in each stage/region. This way, you can easily provision/replicate your AWS resources at once, and roll back to previous deployments, for every stage/region your application uses.
Where do I go from here?
We're currently working on our docs, wiki, best practices and FAQ pages.
Once you become familiar with JAWS, you can read about JAWS AWSM: Amazon Web Services Modules to start contributing awsm's to the community.
How can I help?
Please check out the JAWS V1 Google Document and our CONTRIBUTING.md for coding and PR guidelines.







