evgeniyannenkov / nestjs-aws-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NestJS Server on AWS Lambda

This repository contains a Terraform configuration example for deploying a NestJS server on AWS Lambda, using container images for packaging and API Gateway for public accessibility.

Overview

The project sets up a NestJS application to run as a serverless function within AWS Lambda. This approach allows the NestJS application to benefit from the scalability and cost-efficiency of serverless architecture. The server is packaged into a Docker container image, which is then deployed to Lambda. An API Gateway is configured to create a publicly accessible route to the server.

Prerequisites

Before you begin, ensure you have the following installed:

Additionally, you need:

  • An AWS account with appropriate permissions to manage Lambda, API Gateway, and other required services.
  • Configured AWS credentials on your machine or CI/CD environment.

Setup

1. Clone the Repository

Start by cloning this repository to your local machine:

git clone https://github.com/evgeniyannenkov/nestjs-aws-lambda.git nestjs-aws-lambda
cd nestjs-aws-lambda

2. Deploy Using Terraform

cd infrastructure
terraform init
terraform apply

About


Languages

Language:HCL 75.1%Language:TypeScript 18.6%Language:JavaScript 4.9%Language:Dockerfile 1.4%