Within the stackery UI, you can do enter simple serverless lambda functions to the inline code editor. Once your implementation gets more complex, you will want to edit your lambda code locally. This unlocks a number of features:
- the comfort of your home dev environment
- dependency management, with easy imports of npm modules
- ability to share code modules between lambdas on the same stack (see our guide on shared code modules)
The easiest way to edit code locally is to first create the resources you need in the Stackery UI, commit it within the UI, then clone and modify the repo Stackery created.
- Create the resources you will need (for this demonstration a very simple stack)
- click 'Commit...'
- Your stack will appear in the github org you selected when you created this stack. Clone this repository locally.
- in your local repository, edit the .js in each lambda
- commit your changes and push them up to origin master
- In the stackery UI you'll see a notification about changes to the master branch, click refresh to see your changes
- Prepare Deployment and then deploy!
Any changes committed from the stackery UI will be commits directly to Master. You'll see these show up as normal commits and can pull them down to your local.