AWS have provided Node 8.10 as a lambda runtime. This somewhat removes the need for babel as it provides async/await out of the box. This repository has not been updated to use the new runtime.
- Make this easily deployable in teamcity/riffraff.
- CODE/PROD seperation
- Tests
nvm install 6.10 && nvm use 6.10
yarn
yarn compile && yarn local
- fork this repo
This is responsible for building the lambda, this is a standard npm style package.json. We'll build it with Yarn to ensure versions of dependencies don't change between releases without knowing.
The latest node runtime available in AWS for lambdas in 6.10. The .nvmrc
file will keep you using this when developing.
Turns ES6 into something that will run on aws. (See nvm)
To run our lambda, we need all the code, including any dependencies in the same place Rollup The lambda environoment includes the aws-sdk, so rollup is told to consider it as an external dependency.
This provides us with a somewhat standard issue lambda environment, and allows you to run the lambda with the yarn local
command. Preconfigured to use the membership profile from the normal place. When the file location can be auto-detected, this won't be hardcoded.
This takes our built lambda, and packages it for deployment with riff-raff. It is responsible for the following settings:
isAwsLambda
cloudformation
projectName
riffraffFile
uploadArtefact