Automatically deploy an Express app to AWS in a โจ serverless-y โจ kinda way using API Gateway and Lambda. All you have to do is configure some workflows and maybe restructure your code a tiny bit.
If you follow all of the steps below, you should be able to get this up and running yourself! (better instructions soon ๐ค)
- Create an IAM user with Administrator Access and save these credentials
- Move
app.listen()
to a "dev-only" process ๐งโ๐ป - Export the Express app module from
backend/server.js
- Create a workflow file and set your AWS credentials (example soon)
- Within the workflow, configure the
s3-bucket
andstack-name
inputs, and set any env variables that your API needs ๐ณ
s3-bucket
required - the name of the s3 bucket that will store the build artifacts ๐ชฃstack-name
required - the name of the Cloud Formation stack name to usedomain
- the target domain to deploy the API to. ๐จ currently untested
api-url
- this is the URL generated by AWS for your API
A polished example should come soon. This was tested using this repo, which can hopefully help.