TicketDEX API package
The database and SSH-proxy (bastion) server are in private sub-nets while the lambda-api runs in a public subnet.
The database and SSH-proxy can only be accessed via AWS credentials while using
SSM. See for details
yarn # installs dependencies sls deploy --stage prod # to deploy to production sls deploy # to deploy to staging
We make use of ssh-tunneling allowing us to access remote DB as if it were local database.
yarn pre-migrate # opens up a ssh-tunnel with the DB at port 5000 DB_PORT=5432 yarn pre-migrate # opens up a ssh-tunnel with the DB at port 5432
To run offline after enabling ssh-tunnel run
serverless offline --stage local
We are not using dotenv-safe because serverless framework ignores uploading .env files