/simple-ts-lambda-layer

A simple example using lambda layers within typescript-node

Primary LanguageTypeScript

TS lambda layer

A simple example using lambda layers with NodeJS (Typescript).

Install dependencies

# If using pnpm
cd services && pnpm i

# If using npm
cd services && npm i

Run project locally

# If using pnpm
cd service && pnpm run dev

# If using npm
cd service && npm run dev

Run tests

# If using pnpm
cd service && pnpm run test

# If using npm
cd service && npm run test

Getting ready for production

  • Set AWS environment variables
# You can put them in the shell context so there are available
# before running any command at your terminal.
export AWS_ACCESS_KEY_ID="write_here"
export AWS_SECRET_ACCESS_KEY="write_here"
  • Create an .env file within the service directory and populate it with following values:
# ./services/.env

AWS_REGION=us-east-1
AWS_ACCOUNT_ID=write_here
  • Deploy services
# Root directory.
npm run deploy

And that's it. Super simple.