2.7 KiB
JAWS: Project Structure
All JAWS apps use the directory structure described in the diagram below. This scaffolding can be generated by running the jaws project create command.
jaws.json
See project jaws.json example here
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 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
admin.env
This file tells the JAWS tooling what profile from the
shared credentials
file (~/.aws/credentials) is loaded when doing administrative tasks that interact with AWS.
Here is an example
JAWS_ADMIN_AWS_PROFILE=default
lambdas-cf.json
This is the JAWS lambda 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
resources-cf.json
This is the JAWS CloudFormation resources file. It contains things like the IAM roles for JAWS lambda functions and API Gateway endpoints.
AWSM: Amazon Web Services Modules can merge data into this file by implementing the
resources,LambdaIamPolicyDocumentStatements,and ApiGatewayIamPolicyDocumentStatements 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:
aaHostedZoneaaStageaaProjectNameaaDataModelStagewhat's this?aaNotficationEmailaaDefaultDynamoRWThroughput
The following are CloudFormation Resource names that aws-module creators can Ref in their CF Templates:
IamRoleLambdaIamRoleApiGateway
