Skip to content

Instantly share code, notes, and snippets.

@lucasKoyama
Last active January 17, 2024 15:56
Show Gist options
  • Save lucasKoyama/97c50dc2bfc98fd64922a3e37ccd811f to your computer and use it in GitHub Desktop.
Save lucasKoyama/97c50dc2bfc98fd64922a3e37ccd811f to your computer and use it in GitHub Desktop.
NestJS + DynamoDB setup

Nest.js + AWS DynamoDB Cheat Sheet

Summary

npm i -g @nestjs/cli

Start NestJS project

nest new project-name

Nest.js CRUD generator

nest g resource

It will generate a toon of boilerplate for creating a CRUD, including, controllers, services, types, literally everything to get started!

Generate boilerplate for anything

nest generate --help

AWS DynamoDB

DynamoDB + NestJS CRUD (youtube)

DynamoDB CLI

npm install @aws-sdk/client-dynamodb

AWS CLI and Configs

Installing AWS CLI on Linux Ubuntu

$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install

Configure the AWS credentials

aws configure and insert the credentials from:

Managment Console => https://aws.amazon.com/console/ => Profile => Security Credentials / create and uses IAM access key

Cool Libs

UUID generator

npm i uuid

Class validator and transformer for DTO

npm i class-validator class-transformer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment