---
title: "How to Create Simple Lambda Function in AWS"
description: "Creating function in lambda and how to link it with AWS cloud watch explained."
url: https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/
date: 2022-06-04
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2022/06/pexels-photo-1445416.jpeg?fit=1880%2C1289&ssl=1
categories: ["AWS"]
type: post
lang: en
---

# How to Create Simple Lambda Function in AWS

Here’s [how to create](https://srinimf.com/2024/08/27/how-to-create-fastapi-in-visualstudiocode/) **a lambda function** in AWS. The lambda service supports Java, Node.js, C#, Python, and Go languages.

Once you create, the next step is to implement it. Upload your code, and configure the execution environment. Then, the code executes within a fully managed computing environment.

**Table of contents**

1. [AWS Lambda](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/#aws-lambda)
2. [Lambda is Serverless](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/#2.-Why-is-Lambda-called-Serverless)
3. [Lambda Vs EC2](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/#3.-AWS-Lambda-Vs-EC2-machine)
4. [Blueprint in AWS](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/#4.-What-is-Blueprint-in-AWS)
5. [Steps to create Lambda function](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/#5.-Steps-to-create-Lambda-function)

## **AWS Lambda**

The features of lambda.

- Offers a maintenance-free and highly available computing environment.
- You no longer need to install security updates, replace failed virtual machines, or manage remote access (such as SSH or RDP) for administrators.
- It is billed by invocation. Therefore, you don’t have to pay for idling resources that are waiting for work (for example, for a task triggered once a day).

## **Lambda is Serverless**

- It is a Serverless, event-driven computing service.
- Maintenance is not needed. So it is called serverless. No need to manage and maintain virtual machines.
- Fully managed service offering scalability and high availability.
- Billed per request and by resource consumption. Invoke the function to execute your code in the cloud.

Advertisements

## **[Lambda Vs](https://srinimf.com/2024/10/15/aws-lambda-vs-step-functions-key-differences-explained/) EC2**

Here are the differences between EC2 and Lambda

- Virtual machines provide a full operating system for running one or multiple applications. In contrast, AWS Lambda offers an execution environment for a single function, a small part of an application.
- Amazon EC2 offers VMs as a service, but you are responsible for operating them in a secure, scalable, and highly available way. By contrast, AWS Lambda offers a fully managed execution environment.
- AWS Lambda is billed per execution, and not per second a virtual machine is running.

## **Blueprint in AWS**

Blueprints are sample code templates. You can use them for your first lambda function.

## **Steps to create Lambda function**

1. Visit Blueprints to get the sample code
2. Search for Lambda==> Function==> Create function
3. Fill basic details
4. Create a new IAM role [to write](https://srinimf.com/2024/09/08/aws-3-easy-to-write-lambda-functions/) your Lambda function details to cloud watch
5. Create a cloud watch event
6. Map the rule name in Cloud watch is the same as Lambda function name

That’s it you can watch your **lambda function work in Cloud watch**. You can try this in [AWS console-free account.](https://aws.amazon.com/free/)

Related

- [AWS Lambda vs. Step Functions: Key Differences Explained](https://srinimf.com/2024/10/15/aws-lambda-vs-step-functions-key-differences-explained/)DateOctober 15, 2024
- [Automating AWS Glue Job Trigger from S3 Upload via EventBridge and Lambda](https://srinimf.com/2025/07/13/automating-aws-glue-job-trigger-from-s3-upload-via-eventbridge-and-lambda/)DateJuly 13, 2025
- [AWS Step Functions and AWS Glue Job Workflow Configuration](https://srinimf.com/2024/09/09/aws-step-functions-and-aws-glue-job-workflow-configuration/)DateSeptember 9, 2024

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2022%2F06%2F04%2Fexclusive-how-to-add-lambda-tool-to-aws-services%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2022%2F06%2Fpexels-photo-1445416.jpeg%3Ffit%3D1200%252C823%26ssl%3D1&description=How%20to%20Create%20Simple%20Lambda%20Function%20in%20AWS)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2022/06/04/exclusive-how-to-add-lambda-tool-to-aws-services/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Create%20Simple%20Lambda%20Function%20in%20AWS&body=https%3A%2F%2Fsrinimf.com%2F2022%2F06%2F04%2Fexclusive-how-to-add-lambda-tool-to-aws-services%2F&share=email)
-

### Like this:

Like Loading…
