This repository contains an AWS lambda function that is used to process the emitted events from various singularity users.
npm run build
npm run zip
- Create a PostSQL server and create a database (i.e. the default database postgres)
- Create a table in the database using the schema in create.sql
- Create a lambda function (nodejs runtime) in AWS and upload the zip file created in the build step. (May need to upload to S3 first if it's too large)
- Enable function URL or integrate with API Gateway
- Change general configuration to use 512MB of memory and 15 minutes of timeout
- Add environment variables
DBNAME_PROD
: the database you've just createdPGHOST
: the URL of the databasePGPORT
: the port of the databasePGUSER
: the user of the databasePGPASSWORD
: the password of the database