Prerequisites:

- Sign in to your AWS account using your account credentials.
- Enter "LAMBDA" into the search bar and
press Enter, The search results should display the AWS Lambda service
- From the search results, locate and click on the "Lambda" option. This will direct you to the AWS Lambda service page.
- Click on the region selector
dropdown located at the top-right corner of the console. A list of available
AWS regions will be displayed. Select the region you prefer from the list.
- In the AWS Lambda console, click
on the "Create function" button. Ensure that you have selected the
desired region where you want to execute the function.
After clicking on "Create function", you will be directed to a new screen where you can provide the basic details for function creation
Author from Scratch: This option allows you to create a Lambda function from the ground up using your preferred programming language without any preconfigured code or templates.
Use a Blueprint: This option
provides preconfigured Lambda function templates for various use cases,
enabling you to start with functional code and customize it to suit your needs.
Container Image: This option
lets you package your Lambda function in a container, giving you the flexibility to
use any programming language or runtime that can be containerized.
Function name: Enter a
descriptive name for your function.
Runtime: Select the runtime environment for your function, such as Node.js, Python, or Java.
Architecture:
x86_64:
Intel-compatible 64-bit architecture used in most desktop and server environments.
arm64: ARM-based
64-bit architecture commonly found in mobile devices, embedded systems, and
certain server environments.
** As this is our first lambda
function do not touch any other things, make its default and click on create
function.
Permissions: Configure the required permissions for your function to interact with other AWS resources.
After you have entered all the required details for your function, simply click on the "Create function" button. This will start the process of creating your Lambda function with the provided settings. AWS Lambda will validate the information and set up the function according to your specifications.
Please be patient, as it may take
a little time for the function to be created. Once the process is complete, you
will be redirected to the function's details page, where you can continue to
configure and manage your Lambda function as needed.
As you scroll down, you will find
the following screen:
Feel free to customize the body/code as needed. Here, I have written "Welcome to Code Builders Hut" Click on the Deploy button to deploy the changes. Next, click on the test tab and select "configure test environment" to open the test configuration screen. Provide a name for the event, for example, Test1, and click on Save. You will then be able to view the execution results.
Congratulations on successfully executing your first Lambda function in AWS! You can now observe the response, which should display "Welcome to Code Builders Hut" based on the provided code.
This code/function is small and simple, similar to a "Hello World" example, but it serves as a great starting point to understand the basics of AWS Lambda.Another Sample Example using the Lambda function in AWS
After clicking on the Save button, you will be able to view the successful results displayed below.
Yes, you have successfully executed the two Lambda functions. Well done!
Monitor:
Similarly, you can explore many other things as well.
NOTE: ** Clean the resources to avoid billing **
Thank you all for taking the time to read my blog. I appreciate your support and engagement. Stay tuned for more blog posts where I will share hands-on experiences with various other AWS services.