62
README.md
@ -1,57 +1,67 @@
|
||||

|
||||

|
||||
|
||||
JAWS V1 (BETA)
|
||||
=================================
|
||||
|
||||
[](https://gitter.im/jaws-framework/JAWS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
**Status 9/21:** We've just released JAWS V1 BETA. Please test, submit bug fixes and let us know what you think! We'll be working through the week to improve our documentation and fix bugs. Check out our Road Map below to see what's next.
|
||||
|
||||
Check us out at <img src="http://www.vormetric.com/sites/default/files/aws-re-invent-logo_0.png" align="absbottom">. Our presentation is ["DVO209 - JAWS: The Monstrously Scalable Serverless Framework – AWS Lambda, Amazon API Gateway, and More!"](https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=5494)
|
||||
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.
|
||||
|
||||
**Status 9/18**: The **JAWS V1 RC1 (v1.0.0)** in now available. Significant re-write. Few of the many new features: deploy lambdas via CloudFormation. [AWSM: Amazon Web Services Modules](https://github.com/awsm-org/awsm). Much improved multi-region support. Totally re-done `env` command.
|
||||
<a class="frame" href="https://gitter.im/jaws-framework/JAWS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" target="_blank"><img src="img/jaws_gitter_chatroom.png" align="left" width="300"></a>
|
||||
|
||||
**[Don't forget to join the JAWS Email List for updates!](http://eepurl.com/bvz5Nj)**
|
||||
<br/><br/>
|
||||
|
||||
## Goals:
|
||||
<a href="http://github.us11.list-manage1.com/subscribe?u=b4fad36768cab222f88338995&id=5f8407dded" target="_blank"><img src="img/jaws_email_list.png" align="left" width="300"></a>
|
||||
|
||||
- **No Servers:** The JAWS back-end is comprised entirely of AWS Lambda Functions. You can develop/update/configure each separately without affecting any other part of your application. Your app never goes down. There is no app. Only individual lambda functions can go down.
|
||||
- **Scale Infinitely:** A back-end comprised of Lambda functions comes with a ton of concurrency.
|
||||
- **Be Cheap As Possible:** Lambda functions run only when they are called, and you pay only when they are run.
|
||||
- **All Lambda Runtimes** While first release is `nodejs` only, we plan on adding support for all languages. This means each lambda in your JAWS project can be coded in the lang that best suites the problem.
|
||||
- **API Gateway Auto-Deploy** Creates your API endpoints for you on API Gateway.
|
||||
- **Multi-stage & Multi-Region:** Define stages for your project, and multiple regions with a stage. Driven by [CloudFormation](https://aws.amazon.com/cloudformation/).
|
||||
<br/><br/>
|
||||
|
||||
## Architecture
|
||||
<a href="https://www.livecoding.tv/jaws/" target="_blank"><img src="img/jaws_livecoding_channel.png" align="left" width="300"></a>
|
||||
|
||||
Graphics coming soon...
|
||||
<br/><br/>
|
||||
|
||||
<a href="https://docs.google.com/document/d/1SeTgtsQc620vcwgGMZ4F2yuWVf-A3JmpTn1VT8pKYsA/edit?usp=sharing" target="_blank"><img src="img/jaws_roadmap.png" align="left" width="300"></a>
|
||||
|
||||
<br/><br/>
|
||||
|
||||
<a href="http://teespring.com/jaws_og" target="_blank"><img src="img/jaws_shirts.png" align="left" width="300"></a>
|
||||
|
||||
<br/><br/><br/>
|
||||
|
||||
## Quick Start
|
||||
|
||||
The guide below gets you started quickly. Later, check out the [best practices](https://github.com/jaws-framework/JAWS/wiki/Best-practices) guide in our [wiki](https://github.com/jaws-framework/JAWS/wiki) for tips on security and more.
|
||||
|
||||
* **[Setup an AWS account and create an administrative user](https://github.com/jaws-framework/JAWS/wiki/v1:-AWS-Account-setup)**
|
||||
|
||||
* ```$ npm install jaws-framework -g```
|
||||
|
||||
* ```$ jaws new project```
|
||||
|
||||
**Note:** we recommend camelCase for project names. [Why?](https://github.com/jaws-framework/JAWS/wiki/Best-practices#project-names)
|
||||
|
||||
**Note:** We recommend camelCase for project names. [Why?](https://github.com/jaws-framework/JAWS/wiki/Best-practices#project-names)
|
||||
|
||||
* ```$ cd <new-project-name>```
|
||||
|
||||
* ```$ jaws module create users get```
|
||||
* ```$ jaws module create users list```
|
||||
|
||||
* ```$ jaws dash```
|
||||
|
||||
This will create a new jaws project, create a lambda function and endpoint (and install [jaws-core-js awsm](https://github.com/jaws-framework/jaws-core-js)), which you can immediately deploy via
|
||||
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`.
|
||||
|
||||
## Where do I go from here?
|
||||
## Overview:
|
||||
|
||||
We're currently working on our [docs](./docs/), [wiki](https://github.com/jaws-framework/JAWS/wiki), [best practices](https://github.com/jaws-framework/JAWS/wiki/Best-practices) and [FAQ](https://github.com/jaws-framework/JAWS/wiki/FAQ) pages.
|
||||
JAWS is an application framework for building serverless web, mobile and IoT applications. JAWS comes in the form of a command line interface that provides structure, automation and optimization to help you build and maintain your serverless app.
|
||||
|
||||
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. 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.
|
||||
|
||||
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.
|
||||
|
||||
## Documentation
|
||||
|
||||
During the week of 9/21 we will be finishing up our [docs](./docs/), [wiki](https://github.com/jaws-framework/JAWS/wiki), [best practices](https://github.com/jaws-framework/JAWS/wiki/Best-practices) and [FAQ](https://github.com/jaws-framework/JAWS/wiki/FAQ) pages.
|
||||
|
||||
* **[Commands List](docs/commands.md)**
|
||||
* **[Project Structure](docs/project_structure.md)**
|
||||
* **[Deployment](docs/deployment.md)**
|
||||
* **[AWSM: AWS-Modules](docs/aws_modules.md)**
|
||||
|
||||
Once you become familiar with JAWS, you can read about [JAWS AWSM: Amazon Web Services Modules](https://github.com/awsm-org/awsm) to start contributing awsm's to the community.
|
||||
|
||||
## How can I help?
|
||||
|
||||
Please check out the **[JAWS V1 Google Document](https://docs.google.com/document/d/1SeTgtsQc620vcwgGMZ4F2yuWVf-A3JmpTn1VT8pKYsA/edit#)** and our [CONTRIBUTING.md](./CONTRIBUTING.md) for coding and PR guidelines.
|
||||
|
||||
@ -1,41 +1 @@
|
||||
# JAWS Docs
|
||||
|
||||
## Project layout
|
||||
|
||||
This is the scaffolding jaws-cli produces on the new command. It’s bare because all logic has been modularized. Here is a nodejs example:
|
||||
|
||||
* back
|
||||
* [.env](./commands.md#env)
|
||||
* **aws_modules**
|
||||
* **jaws-core-js**
|
||||
* awsm.json
|
||||
* package.json
|
||||
* **env**
|
||||
* index.js
|
||||
* **user**
|
||||
* **lib**
|
||||
* **create**
|
||||
* awsm.json
|
||||
* handler.js
|
||||
* index.js
|
||||
* **delete**
|
||||
* **get**
|
||||
* **cloudformation**
|
||||
* **mystage**
|
||||
* **us-east-1**
|
||||
* [resources-cf.json](./resources-cf-json.md)
|
||||
* [lambdas-cf.json](./lambdas-cf-json.md)
|
||||
* **front**
|
||||
* **tests**
|
||||
* [admin.env](./admin-env.md)
|
||||
* [jaws.json](./jaws-json.md)
|
||||
|
||||
## JAWS CLI
|
||||
|
||||
JAWS is mostly a CLI. The purpose of the jaws-cli is to make the server-less workflow easy. This involves automation to help manage CloudFormation, multiple regions and stages, deployment of Lambda functions, AWS API Gateway endpoints.
|
||||
|
||||
See the [CLI Docs here](./commands.md)
|
||||
|
||||
## JAWS plug-in modules
|
||||
|
||||
See the [AWSM: Amazon Web Services Modules](https://github.com/awsm-org/awsm)
|
||||
Welcome to the JAWS Documentation! Select a document to view it :)
|
||||
@ -1,9 +0,0 @@
|
||||
This file tells the JAWS tooling what profile from the
|
||||
[shared credentials](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Credentials_from_the_Shared_Credentials_File_____aws_credentials_)
|
||||
file (`~/.aws/credentials`) is loaded when doing administrative tasks that interact with AWS.
|
||||
|
||||
Here is an example
|
||||
|
||||
```
|
||||
ADMIN_AWS_PROFILE=default
|
||||
```
|
||||
9
docs/aws_modules.md
Normal file
@ -0,0 +1,9 @@
|
||||
# JAWS: AWS-Modules (awsm)
|
||||
|
||||
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](https://github.com/awsm-org/awsm) (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!
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/awsm-org/awsm" target="_blank"><img src="../img/jaws_and_awsm.png" align="center" width="400" alt="awsm aws-module jaws"></a>
|
||||
</p>
|
||||
@ -1,82 +1,86 @@
|
||||
# JAWS CLI Commands
|
||||
# JAWS: CLI Commands
|
||||
|
||||
### jaws new
|
||||
### New Commands
|
||||
|
||||
Creates a new project, new stage in existing project, or a new region in an existing stage as well as ENV var file in the JAWS S3 bucket for the region. The new command by default creates resources (like IAM roles) in AWS via CloudFormation.
|
||||
Create a project, a project region or a project stage using the `new` commands.
|
||||
|
||||
##### type `project`
|
||||
* ##### `$ jaws new project`
|
||||
* Makes a new JAWS project by generating scaffolding in the current working directory. The new command by default creates resources (like IAM roles) in AWS via CloudFormation.
|
||||
* Walks the user through the following prompts asking for their AWS credentials/profile and their project specifications
|
||||
* Creates a CloudFormation Stack for the user’s first stage, which creates an IAM Group and a staged IAM Role for that IAM Group
|
||||
* Creates all project scaffolding in current working directory
|
||||
* Creates an AWS API Gateway REST API for the project
|
||||
* Creates environment var file in the s3 bucket (created if DNE) for the initial stage. [Why S3?](https://github.com/jaws-framework/JAWS/wiki/FAQ#why-do-you-use-an-s3-bucket-to-store-env-vars)
|
||||
|
||||
This makes a new JAWS project by creating the file structure in the [project layout](./README.md#project-layout) section to the current working directory.
|
||||
* ##### `$ jaws new region`
|
||||
|
||||
1. Walks the user through the following prompts asking for their AWS credentials/profile and their project specifications
|
||||
1. Creates a CloudFormation Stack for the user’s first stage, which creates an IAM Group and a staged IAM Role for that IAM Group
|
||||
1. Creates all project scaffolding in current working directory
|
||||
1. Creates an AWS API Gateway REST API for the project
|
||||
1. Creates environment var file in the s3 bucket (created if DNE) for the initial stage. [Why s3?](https://github.com/jaws-framework/JAWS/wiki/FAQ#why-do-you-use-an-s3-bucket-to-store-env-vars)
|
||||
* Creates new region in existing project. By default executes CloudFormation to make one stage in new region.
|
||||
|
||||
##### type `region`
|
||||
* ##### `$ jaws new stage`
|
||||
|
||||
Creates new region in existing project. By default executes CloudFormation to make one stage in new region.
|
||||
* Creates a new stage in existing region. By default executes CloudFormation to make new stage.
|
||||
|
||||
##### type `stage`
|
||||
### Module Commands
|
||||
|
||||
Creates a new stage in existing region. By default executes CloudFormation to make new stage.
|
||||
* ##### `$ jaws module create`
|
||||
|
||||
### jaws module
|
||||
* Creates one or both of the following in the `back/aws_modules` folder. Default is to create both:
|
||||
* A lambda function in the `back/aws_modules` folder with basic scaffolding.
|
||||
* An API gateway configuration
|
||||
|
||||
This command manages [JAWS AWS Modules](https://github.com/awsm-org/awsm).
|
||||
* ##### `$ jaws module install`
|
||||
|
||||
##### sub-command `install`
|
||||
* Download and installs an awsm from github to the `back/aws_modules` dir. By default installs module dependencies (if any)
|
||||
|
||||
Download and installs an awsm from github to the `back/aws_modules` dir. By default installs module dependencies (if any)
|
||||
* ##### `$ jaws module update`
|
||||
|
||||
##### sub-command `update`
|
||||
* Updates an existing awsm in the `back/aws_modules` dir. By default installs module dependencies (if any)
|
||||
|
||||
Updates an existing awsm in the `back/aws_modules` dir. By default installs module dependencies (if any)
|
||||
### Dash Commands
|
||||
|
||||
##### sub-command `create`
|
||||
Deploy your lambdas and endpoints using the JAWS dashboard.
|
||||
|
||||
Creates one or both of the following in the `back/aws_modules` folder. Default is to create both:
|
||||
* ##### `$ jaws dash`
|
||||
|
||||
* A lambda function in the `back/aws_modules` folder with basic scaffolding.
|
||||
* An API gateway configuration
|
||||
* Interactive dashboard used to get an overview of your project and deploy resources
|
||||
|
||||
### jaws dash
|
||||
### ENV Commands
|
||||
|
||||
Interactive dashboard used to get an overview of your project and deploy resources
|
||||
Modeled after Heroku's environment variable commands, these commands manage environment variable files for all stages. There is a reserved stage `local` which stores the env var file in `back/.env`. Otherwise they are stored is s3 at `s3://<projjaws.json:envVarBucket.name>/JAWS/envVars/<projectName>/<stage>`
|
||||
|
||||
### jaws env
|
||||
* ##### `$ jaws env list`
|
||||
|
||||
Manages environment variable files for all stages. There is a reserved stage `local` which stores the env var file in `back/.env`. Otherwise they are stored is s3 at `s3://<proj jaws.json:envVarBucket.name>/JAWS/envVars/<projectName>/<stage>`
|
||||
* List all env vars for given stage. Will display env vars that each jaws-module uses and indicate env vars that are not yet set.
|
||||
|
||||
Supported operations:
|
||||
* ##### `$ jaws env get`
|
||||
|
||||
* `list`: List all env vars for given stage. Will display env vars that each jaws-module uses AND indicates env vars that are not yet set.
|
||||
* `get`: get the value for a specific key
|
||||
* `set`: set value for key
|
||||
* `unset`: remove a specific key
|
||||
* Get the value for a specific key.
|
||||
|
||||
When code is deployed via `jaws deploy` or `jaws dash` the env var file is downloaded from s3 and put in the root of the zip file named `.env`. This exactly replicates the code layout of local development, as the root of the zip starts at the `back` dir.
|
||||
* ##### `$ jaws env set`
|
||||
|
||||
### jaws tag
|
||||
* Set the value for a specific key.
|
||||
|
||||
Non-interactive way (dash alternative) to indicate which (or all) labmda|api changes to deploy when the `jaws deploy` command is run.
|
||||
* ##### `$ jaws env unset`
|
||||
|
||||
### jaws deploy
|
||||
* Unset the value for a specific key.
|
||||
|
||||
Non-interactive way (dash alternative) to deploy lambda|api resources that have been `jaws tag`. If `jaws deploy` is run from a lambda dir (has `lambda` attr defined in its `jaws.json`) it will automatically tag and then deploy.
|
||||
### Tag Commands
|
||||
|
||||
When deploying a Lambda function to AWS, JAWS will:
|
||||
Non-interactive way (dash alternative) to indicate which (or all) labmda|endpoint changes to deploy when the `jaws deploy` command is run.
|
||||
|
||||
* Check the Runtime specified in the current lambda’s jaws.json (dir running JAWS cli from) and perform a corresponding build pipeline. Optionally optimize the code for performance in Lambda (browserify & uglifyjs2). See the [lambda attributes](./jaws-json.md#lambda-attributes) for optimization options. [Why optimize?](https://github.com/jaws-framework/JAWS/wiki/FAQ#why-optimize-code-before-deployment)
|
||||
* Create or update lambda using this naming convention: `STAGE_-_PROJECTNAME_-_FUNCTIONNAME`. For example: `prod_-_MyApp_-_usersSignup`
|
||||
* Upload the file as a buffer directly to AWS.
|
||||
* ##### `$ jaws tag <type>`
|
||||
|
||||
### jaws log
|
||||
* Takes `lambda | endpoint` as type
|
||||
* Tags current workign directory for deployment.
|
||||
|
||||
This command fetches logs from AWS Cloudformation for the lambda function in a given region & stage.
|
||||
### Deploy Commands
|
||||
|
||||
Non-interactive way (dash alternative) to deploy lambda|endpoint resources that have been `jaws tag`. If `jaws deploy` is run from a lambda dir (has `lambda` attr defined in its `jaws.json`) it will automatically tag and then deploy.
|
||||
|
||||
* ##### `$ jaws deploy`
|
||||
|
||||
* Deploys tagged resources
|
||||
|
||||
This command is not implemented yet. Looking for help from community. Need a way to stream the logs "real time" like heroku logs.
|
||||
|
||||
|
||||
|
||||
|
||||
23
docs/deployment.md
Normal file
@ -0,0 +1,23 @@
|
||||
# JAWS: 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.
|
||||
|
||||

|
||||
|
||||
## Lambda Deployment Process:
|
||||
|
||||
### Node.js
|
||||
|
||||
* Check the Runtime specified in the current lambda’s jaws.json (dir running JAWS cli from).
|
||||
* Perform a build pipeline corresponding to the lambda's runtime. Optionally optimize the code for performance in Lambda (browserify & uglifyjs2). See the [lambda attributes](./project_structure.md#lambda-attributes) for optimization options. [Why optimize?](https://github.com/jaws-framework/JAWS/wiki/FAQ#why-optimize-code-before-deployment)
|
||||
* Create a temp/dist directory for your lambda and move your lambda files to it.
|
||||
* Download the ENV variables from the project/stage/region's S3 bucket and put in the root of the temp directory, and title it `.env`. This exactly replicates the code layout of local development, as the root of the temp/dist directory starts at the `back` dir.
|
||||
* Compress the lambda into a zip file and upload it to your project's S3 bucket, in the correct stage and region.
|
||||
* Add/update the lambda and its S3 key in your lambda Cloudformation template for this stage/region: `lambdas-cf.json`.
|
||||
* Save copies of your updated `lambdas-cf.json` to your local project and your project's S3 bucket in the correct stage/region.
|
||||
* Perform a Cloudformation stack update to create/update/delete your modified lambdas.
|
||||
|
||||
## Api Gateway/Endpoint Deployment Process:
|
||||
|
||||
Needs documentation...
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
# jaws.json
|
||||
|
||||
See project `jaws.json` [example here](../examples/project-jaws.json)
|
||||
|
||||
The `jaws.json` file contains project configuration and authorship details.
|
||||
|
||||
## Common jaws.json attributes
|
||||
|
||||
The following attributes should exist in either a project or lambda `jaws.json` at the top level
|
||||
|
||||
* **name**: project/module or lambda action name
|
||||
* **version**: project/module or lambda [Semantic Versioning](http://semver.org/) number.
|
||||
* **location**: project/module or lambda scm url (if exists)
|
||||
* **author**: `John Serverless <john@gmail.com> http://www.john.com`
|
||||
* **description**: project/module or lambda desc.
|
||||
* **stages**: map of all your stages, and regions those stages are in as well as IAM roles
|
||||
* **jawsBuckets**: map of region to bucket name for JAWS S3 bucket in the region
|
||||
@ -1,5 +0,0 @@
|
||||
This is the JAWS lambda [CloudFormation](https://aws.amazon.com/cloudformation/) file.
|
||||
|
||||
It contains your lambda function topology and facilitates the deployent and mangement of your lambda functions for a given stage and region.
|
||||
|
||||
You can see a [`lambdas-cf.json` example here](../lib/templates/lambdas-cf.json)
|
||||
67
docs/project_structure.md
Normal file
@ -0,0 +1,67 @@
|
||||
# JAWS: Project Structure
|
||||
|
||||
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.json
|
||||
|
||||
See project `jaws.json` [example here](../examples/project-jaws.json)
|
||||
|
||||
The `jaws.json` file contains project configuration and authorship details.
|
||||
|
||||
### Common jaws.json attributes
|
||||
|
||||
The following attributes should exist in either a project or lambda `jaws.json` at the top level
|
||||
|
||||
* **name**: project/module or lambda action name
|
||||
* **version**: project/module or lambda [Semantic Versioning](http://semver.org/) number.
|
||||
* **location**: project/module or lambda scm url (if exists)
|
||||
* **author**: `John Serverless <john@gmail.com> http://www.john.com`
|
||||
* **description**: project/module or lambda desc.
|
||||
* **stages**: map of all your stages, and regions those stages are in as well as IAM roles
|
||||
* **jawsBuckets**: map of region to bucket name for JAWS S3 bucket in the region
|
||||
|
||||
## admin.env
|
||||
|
||||
This file tells the JAWS tooling what profile from the
|
||||
[shared credentials](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Credentials_from_the_Shared_Credentials_File_____aws_credentials_)
|
||||
file (`~/.aws/credentials`) is loaded when doing administrative tasks that interact with AWS.
|
||||
|
||||
Here is an example
|
||||
|
||||
```
|
||||
ADMIN_AWS_PROFILE=default
|
||||
```
|
||||
|
||||
## lambdas-cf.json
|
||||
|
||||
This is the JAWS lambda [CloudFormation](https://aws.amazon.com/cloudformation/) file.
|
||||
|
||||
It contains your lambda function topology and facilitates the deployent and mangement of your lambda functions for a given stage and region.
|
||||
|
||||
You can see a [`lambdas-cf.json` example here](../lib/templates/lambdas-cf.json)
|
||||
|
||||
## resources-cf.json
|
||||
|
||||
This is the JAWS [CloudFormation](https://aws.amazon.com/cloudformation/) resources file. It contains things like the IAM roles for JAWS lambda functions and API Gateway endpoints.
|
||||
|
||||
[AWSM: Amazon Web Services Modules](https://github.com/awsm-org/awsm) can merge data into this file by implementing the
|
||||
[`resources`,`LambdaIamPolicyDocumentStatements`,and `ApiGatewayIamPolicyDocumentStatements`](https://github.com/awsm-org/awsm/blob/master/README.md#configuration) attribute in the `awsm.json`.
|
||||
|
||||
The following CloudFormation Parameters are standardized JAWS project variables that all aws-module CloudFormation
|
||||
templates should utilize via `Ref`. Note: `aa` is used so they show up at top of CloudFormation web UI:
|
||||
|
||||
* `aaHostedZone`
|
||||
* `aaStage`
|
||||
* `aaProjectName`
|
||||
* `aaDataModelStage` [what's this?](https://github.com/jaws-framework/JAWS/wiki/v1:best-practices#cloud-formation-segmentation)
|
||||
* `aaNotficationEmail`
|
||||
* `aaDefaultDynamoRWThroughput`
|
||||
|
||||
The following are CloudFormation Resource names that aws-module creators can `Ref` in their CF Templates:
|
||||
|
||||
* `IamRoleLambda`
|
||||
* `IamRoleApiGateway`
|
||||
@ -1,19 +0,0 @@
|
||||
This is the JAWS [CloudFormation](https://aws.amazon.com/cloudformation/) resources file. It contains things like the IAM roles for JAWS lambda functions and API Gateway endpoints.
|
||||
|
||||
[AWSM: Amazon Web Services Modules](https://github.com/awsm-org/awsm) can merge data into this file by implementing the
|
||||
[`resources`,`LambdaIamPolicyDocumentStatements`,and `ApiGatewayIamPolicyDocumentStatements`](https://github.com/awsm-org/awsm/blob/master/README.md#configuration) attribute in the `awsm.json`.
|
||||
|
||||
The following CloudFormation Parameters are standardized JAWS project variables that all aws-module CloudFormation
|
||||
templates should utilize via `Ref`. Note: `aa` is used so they show up at top of CloudFormation web UI:
|
||||
|
||||
* `aaHostedZone`
|
||||
* `aaStage`
|
||||
* `aaProjectName`
|
||||
* `aaDataModelStage` [what's this?](https://github.com/jaws-framework/JAWS/wiki/v1:best-practices#cloud-formation-segmentation)
|
||||
* `aaNotficationEmail`
|
||||
* `aaDefaultDynamoRWThroughput`
|
||||
|
||||
The following are CloudFormation Resource names that aws-module creators can `Ref` in their CF Templates:
|
||||
|
||||
* `IamRoleLambda`
|
||||
* `IamRoleApiGateway`
|
||||
@ -1,56 +1,56 @@
|
||||
{
|
||||
"name": "create-user",
|
||||
"version": "0.0.1",
|
||||
"location": "",
|
||||
"author": "Joe Smith <vera@gmail.com> http://joe.io",
|
||||
"description": "",
|
||||
"lambda": {
|
||||
"envVars": [
|
||||
"MYAPP_SERVICE_KEY",
|
||||
"MYAPP_SERVICE2_KEY"
|
||||
],
|
||||
"deploy": false,
|
||||
"package": {
|
||||
"optimize": {
|
||||
"builder": "browserify",
|
||||
"minify": true,
|
||||
"ignore": [],
|
||||
"exclude": [
|
||||
"aws-sdk"
|
||||
],
|
||||
"includePaths": []
|
||||
},
|
||||
"excludePatterns": []
|
||||
},
|
||||
"cloudFormation": {
|
||||
"Description": "",
|
||||
"Handler": "aws_modules/users/create/index.handler",
|
||||
"MemorySize": 1024,
|
||||
"Runtime": "nodejs",
|
||||
"Timeout": 6
|
||||
}
|
||||
},
|
||||
"apiGateway": {
|
||||
"deploy": false,
|
||||
"cloudFormation": {
|
||||
"path": "",
|
||||
"method": "GET",
|
||||
"authorizationType": "none",
|
||||
"apiKeyRequired": false,
|
||||
"requestTemplates": {},
|
||||
"requestParameters": {},
|
||||
"responses": {
|
||||
"default": {
|
||||
"statusCode": "200",
|
||||
"responseParameters": {},
|
||||
"responseTemplates": {
|
||||
"application/json": ""
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"statusCode": "400"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "create-user",
|
||||
"version": "0.0.1",
|
||||
"location": "",
|
||||
"author": "Joe Smith <vera@gmail.com> http://joe.io",
|
||||
"description": "",
|
||||
"lambda": {
|
||||
"envVars": [
|
||||
"MYAPP_SERVICE_KEY",
|
||||
"MYAPP_SERVICE2_KEY"
|
||||
],
|
||||
"deploy": false,
|
||||
"package": {
|
||||
"optimize": {
|
||||
"builder": "browserify",
|
||||
"minify": true,
|
||||
"ignore": [],
|
||||
"exclude": [
|
||||
"aws-sdk"
|
||||
],
|
||||
"includePaths": []
|
||||
},
|
||||
"excludePatterns": []
|
||||
},
|
||||
"cloudFormation": {
|
||||
"Description": "",
|
||||
"Handler": "aws_modules/users/create/index.handler",
|
||||
"MemorySize": 1024,
|
||||
"Runtime": "nodejs",
|
||||
"Timeout": 6
|
||||
}
|
||||
},
|
||||
"apiGateway": {
|
||||
"deploy": false,
|
||||
"cloudFormation": {
|
||||
"path": "",
|
||||
"method": "GET",
|
||||
"authorizationType": "none",
|
||||
"apiKeyRequired": false,
|
||||
"requestTemplates": {},
|
||||
"requestParameters": {},
|
||||
"responses": {
|
||||
"default": {
|
||||
"statusCode": "200",
|
||||
"responseParameters": {},
|
||||
"responseTemplates": {
|
||||
"application/json": ""
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"statusCode": "400"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "example-project",
|
||||
"version": "0.0.1",
|
||||
"location": "https://github.com/jaws-stack/example-project",
|
||||
"author": "Vera D. Servers <vera@gmail.com> http://vera.io",
|
||||
"description": "example-project: An ambitious, server-less application built with the JAWS framework.",
|
||||
"project": {
|
||||
"stages": {
|
||||
"mystage": [
|
||||
{
|
||||
"region": "us-east-1",
|
||||
"iamRoleArnLambda": "arn:aws:iam::123456789012:role/mystage-example-project-IamRoleLambda-Y0MERBSAAAK",
|
||||
"iamRoleArnApiGateway": "arn:aws:iam::123456789012:role/mystage-example-project-IamRoleApiGateway-1CKUOL86MDKA"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jawsBuckets": {
|
||||
"us-east-1": "jaws-east-1.myco.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "example-project",
|
||||
"version": "0.0.1",
|
||||
"location": "https://github.com/jaws-stack/example-project",
|
||||
"author": "Vera D. Servers <vera@gmail.com> http://vera.io",
|
||||
"description": "example-project: An ambitious, server-less application built with the JAWS framework.",
|
||||
"project": {
|
||||
"stages": {
|
||||
"mystage": [
|
||||
{
|
||||
"region": "us-east-1",
|
||||
"iamRoleArnLambda": "arn:aws:iam::123456789012:role/mystage-example-project-IamRoleLambda-Y0MERBSAAAK",
|
||||
"iamRoleArnApiGateway": "arn:aws:iam::123456789012:role/mystage-example-project-IamRoleApiGateway-1CKUOL86MDKA"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jawsBuckets": {
|
||||
"us-east-1": "jaws-east-1.myco.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
img/jaws_and_awsm.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
img/jaws_deployment_diagram.png
Normal file
|
After Width: | Height: | Size: 530 KiB |
BIN
img/jaws_email_list.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
img/jaws_files_diagram.png
Normal file
|
After Width: | Height: | Size: 417 KiB |
|
Before Width: | Height: | Size: 790 KiB After Width: | Height: | Size: 790 KiB |
BIN
img/jaws_gitter_chatroom.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
img/jaws_livecoding_channel.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
img/jaws_roadmap.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
img/jaws_shirts.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
@ -123,7 +123,7 @@ CMD.prototype._prompt = Promise.method(function() {
|
||||
_this.Prompter.override.name = _this._name;
|
||||
_this._prompts.properties.name = {
|
||||
description: 'Enter a project name: '.yellow,
|
||||
default: 'jaws-' + shortid.generate().replace(/\W+/g, '').substring(0, 19),
|
||||
default: 'jaws-' + shortid.generate().replace(/\W+/g, '').substring(0, 19).replace('_',''),
|
||||
message: 'Name must be only letters, numbers, underscores or dashes',
|
||||
conform: function(name) {
|
||||
var re = /^[a-zA-Z0-9-_]+$/;
|
||||
@ -386,7 +386,8 @@ CMD.prototype._createCfStack = Promise.method(function() {
|
||||
var _this = this;
|
||||
|
||||
// Start loading icon
|
||||
_this._spinner = JawsCLI.spinner('Creating CloudFormation Stack for your new project (~5 mins)...');
|
||||
JawsCLI.log('Creating CloudFormation Stack for your new project (~5 mins)...');
|
||||
_this._spinner = JawsCLI.spinner('');
|
||||
_this._spinner.start();
|
||||
|
||||
// Create CF stack
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jaws-framework",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"preferGlobal": true,
|
||||
"description": "JAWS is the serverless framework powered by Amazon Web Services.",
|
||||
"author": "Austen Collins <austen@servant.co>, Ryan Pendergast <ryan.pendergast@gmail.com>",
|
||||
@ -56,6 +56,7 @@
|
||||
"readdirp": "^1.4.0",
|
||||
"shelljs": "^0.5.3",
|
||||
"shortid": "^2.2.2",
|
||||
"shelljs": "^0.5.3",
|
||||
"temp": "^0.8.3",
|
||||
"uglify-js": "^2.4.24",
|
||||
"wrench": "^1.5.8"
|
||||
|
||||