Skip to content

danielmarzan/serverless-appsync-typescript-template

Repository files navigation

Serverless - AWS Node.js Typescript

This project has been generated using the aws-nodejs-typescript template from the Serverless framework.

For detailed instructions, please refer to the documentation.

Installation/deployment instructions

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, run nvm use to ensure you're using the same Node version in local and in your lambda's runtime.

Configure AWS SSO when using plugin "serverless-better-credentials",

- 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

Using Serverless

  • Run npm i to install the project dependencies
  • Run sls deploy to deploy this stack to AWS

Template features

3rd party libraries

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published