Serverless application distributing patch notes for NCLS Development's Orca solution.
The project is packaged into an AWS CloudFormation stack that contains:
- an AWS API Gateway API with a single resource (
/{version}
) exposing itsGET
,PUT
andDELETE
methods to: - a collection of AWS Lambda functions that manipulate data stored in:
- a single AWS DynamoDB table
The Angular 5 web application for editing and publishing patch notes as a front-end to this API.
- Develop an editor to write up the patch notes
- Restrict access to
PUT
andDELETE
methods - Set up DNS records to expose the API behind a human-readable URL
-
Use Swagger to describe the API - Re-implement CORS the proper way (as soon as awslabs/serverless-application-model#248 is resolved)
Set up the development environment using:
npm install
You will also need to have installed both Webpack and the AWS CLI:
- For Webpack,
npm install -g webpack
- For the AWS CLI, refer to Installing the AWS Command Line Interface
The building/deployment operation is done in three steps: a webpack
build, a cloudformation package
ing and a cloudformation deploy
ment.
- Webpack build
npm run build
This step will create a minified dist/index.js
build, excluding node packages available from AWS Lambda.
- CloudFormation packaging
npm run package
This step will:
- Zip the
dist/index.js
file - Upload it to an AWS S3 bucket
- Add a
CodeUri
property, specifying the location of the zip file in the bucket for each function inapp-spec.yaml
- Generate an updated
dist/app-spec.packaged.yaml
- CloudFormation Deployment
npm run deploy
This step will:
- Call the CloudFormation
CreateChangeSet
operation withdist/app-spec.packaged.yaml
- Call the CloudFormation
ExecuteChangeSet
operation with the name of thechangeset
newly created