All JAWS apps use the directory structure described in the diagram below. This scaffolding can be generated by running the jaws project create
command.
See project jaws.json
example here
The jaws.json
file contains project configuration and authorship details.
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 <[email protected]> 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
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
ADMIN_AWS_PROFILE=default
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
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:
aaHostedZone
aaStage
aaProjectName
aaDataModelStage
what's this?aaNotficationEmail
aaDefaultDynamoRWThroughput
The following are CloudFormation Resource names that aws-module creators can Ref
in their CF Templates:
IamRoleLambda
IamRoleApiGateway