Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.69 KB

File metadata and controls

44 lines (34 loc) · 1.69 KB

nest-lambda-docker-container-surpport

This project show you how to deploy the Nestjs Backend app to Lambda the fastest using docker image.


following steps

Before we start, we need docker and aws cli. If it's not installed, please refer to the link below.

Ensure Docker CLI is installed: https://docs.docker.com/get-docker/

If the installation is complete, let's get started.

  • npm install serverless -g
  • insert command
    serverless config credentials \
      --provider aws \
      --key <INSERT YOUR ACCESS KEY> \
      --secret <INSERT YOUR SECRET KEY> \
      --profile lambda-docker
    
  • pull "lambda nodejs:14" docker image
    docker pull public.ecr.aws/lambda/nodejs:14
    
  • Come back to the nest-lambda-docker-container-surport project then add modules
    yarn add
    
  • This is all!! Now Let's deploy!!
    sls deploy
    
  • Wait a minute then you will Success deploy Click Me!

We deployed the Nestjs backend app using Lambda's newly added Lambda docker container support. This means that Nestjsapp can be operated in a Serverless environment, not in a Provisioning environment, a service such as AWS EC2. It also means that it can be distributed up to 10GB of capacity, which can escape from the capacity limitations of the existing ZIP method.

If you want more info please vist my blog