Skip to content

abhishekjkrsna/lambda-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

image

This is a project showing a working example of creating lambda functions through docker images.

Function url: https://arbp3ozhbrrlsgsoyhk6vebmmu0ylssg.lambda-url.ap-south-1.on.aws/

Steps to execute this function:

  1. Clone the git repository.
    git clone https://github.com/abhishekjkrsna/lambda-nodejs
    
  2. Makes changes to the lambda handler function in app.js if you want.
  3. Containerize the file
    docker build -t <image name> .
  4. Run the docker image locally.
    docker run -p 9000:8080 <image name>
  5. Test the function by running it locally.
    curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d ''

How to upload the image on AWS Lambda:

  1. Register the image in a AWS ECR Private Repository, Public repositories will not work here.
  2. Select your image and click create function.
  3. Congratulations, you have just created your first aws lambda function through docker.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors