This project has been generated using the aws-nodejs-typescript
template from the Serverless framework.
For detailed instructions, please refer to the documentation.
Depending on your preferred package manager, follow the instructions below to deploy your project.
Requirements: NodeJS
lts/fermium (v.14.15.0)
. If you're using nvm, runnvm use
to ensure you're using the same Node version in local and in your lambda's runtime.
- Configure profile
- https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html,
- https://www.serverless.com/plugins/serverless-better-credentials
- https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-region.html#setting-region-config-file
- Switch profile:
- export AWS_PROFILE=<your sso profile>
- export AWS_SDK_LOAD_CONFIG=1
- if needed add these to your ~/.zshrc
- Run
npm i
to install the project dependencies - Run
sls deploy
to deploy this stack to AWS
- json-schema-to-ts - uses JSON-Schema definitions used by API Gateway for HTTP request validation to statically generate TypeScript types in your lambda's handler code base
- middy - middleware engine for Node.Js lambda. This template uses http-json-body-parser to convert API Gateway
event.body
property, originally passed as a stringified JSON, to its corresponding parsed object - @serverless/typescript - provides up-to-date TypeScript definitions for your
serverless.ts
service file