How to Create Lambda function on Amazon Web Service(AWS).

AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 2

 

  • Under Compute select Lambda.

 

Fig 1

 

  • Click on Create Function.

 

Fig. 3

 

  • We have multiple method to create lambda function.
  • When select Author from scratch.
  • Provide function name.
  • Select Runtime Language: Node.js, java or python.

 

Fig. 4

 

  • Click on Advanced settings.
  • Provide existing VPC.
  • Click on Create Function.

 

Fig. 5

 

  • When select Use a blueprint.
  • Then search Blueprint.For example hello-world.

 

Fig. 6

 

  • Select hello-world.Click on Configure.

 

Fig. 7

 

  • Provide function name.

 

Fig. 8

 

  • Click on Create function.

 

Fig. 9

 

  • When select Container Image.
  • Provide function name.
  • Provide Container image URI from ECR.
  • Click on Create function.

 

Fig 10

 

  • After sometime lambda is ready.

 

Fig 10

 

  • Click on New Lambda function name.
  • Click on Add trigger.

 

Fig 11

 

  • Select a trigger.For example select Cloudwatch.

 

Fig 12

 

  • Provide log group name,filter name & filter pattern.
  • Click on Add.

 

Fig 13

 

  • Click on Add destination.

 

Fig 14

 

  • Create SNS topic for notification.
  • Click on Save.

 

Fig 15

 

Create Lambda function using Shell

 aws lambda create-function  –function-name my-function   –runtime runtime-language

 

Leave a Reply