Posts

AWS Lambda Layers - Node Js

Image
by Revathi Ganapuram  Adding Layers in AWS Lambda Overview :   A Lambda layer is an archive containing additional code, such as libraries, dependencies, or even custom runtimes. The layer later can be used by adding in Layers option in AWS Lambda.     In this post, we will learn how to create and add layers for node js functions in AWS Lambda. Firstly, we will create a sample code of printing current data and time like below For this we have created  a folder named AWSLAYERS , in that we have added initialized 'npm init'. Next, for printing date and time we need moment module, let's install it. npm install moment --save.   After successful installation of `moment` a node module package will be created inside folder and also package.json file. Now here comes the actual part, create a folder names 'nodejs' and move nodemodules, package.json (package-lock.json also , if present) inside nodejs folder. After moving the folder structure should be as below. ...

AWS Lambda Function - Node Js

Image
by Revathi Ganapuram   Creating NodeJs Function in AWS Lambda      Hello guys, today we will create a Lambda function using NodeJs as runtime directly in AWS Console. Introduction to AWS :     AWS Lambda is a server less computing service provided by Amazon to reduce the configuration of servers, OS, Scalability, etc. AWS Lambda is capable of executing code on AWS Cloud. It runs in response to events on different AWS resources, which triggers AWS Lambda functions. Let’s Start :      Before starting in order to write a function in AWS , we need a AWS account. The process of creating a AWS Account is simple and requires only few minutes. After successful creation and login in AWS Console , click on 'Lambda' on services or simply search 'Lambda' in search bar. Click on create function. Select 'Author from Scratch', provide any function name and select 'NodeJs 14.x ' as runtime from dropdown and click on ' Create Function '. For example, h...

Popular posts from this blog

AWS Lambda Function - Node Js

AWS Lambda Layers - Node Js