0Pricing
Serverless AWS Lambda Development · Lesson

Your First Lambda Function

Write, configure, and deploy a simple 'Hello World' Lambda function using the AWS console, gaining hands-on experience with the platform.

Your First Lambda Function is a free Serverless AWS Lambda Development lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Serverless AWS Lambda Development learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Your First Lambda Function

Time to build! You will create and deploy your first Hello World Lambda right in the AWS console — your practical step into serverless.

Find Lambda in AWS Console

Log into the AWS console, search "Lambda" in the top bar, and select it to open the Lambda dashboard where all your functions live.

Start a New Lambda Function

On the dashboard, click Create function and choose "Author from scratch" to define a brand-new serverless function.

Name Your Function & Runtime

Set the basics: a unique Function name and a Runtime — the language your code runs in. We will use Python 3.9 here.

Lambda's Permissions: Execution Role

Your function needs an execution role (an IAM role) for permissions. Pick "Create a new role with basic Lambda permissions" to allow CloudWatch logs.

Code Your 'Hello World'

The console opens a code editor — replace the default with this simple Python Hello World handler.

import json

def lambda_handler(event, context):
    # Log the event for debugging purposes
    print(f"Received event: {event}")

    # Return a simple greeting
    return {
        'statusCode': 200,
        'body': json.dumps('Hello from your first Lambda!')
    }

Save & Deploy Your Function

After editing, click Deploy to save your changes and make the new version live. Skip this and the Lambda service keeps the old code.

Test Your Lambda Function

Open the Test tab and configure a test event — the hello-world template works — name it, then click Test to invoke your function and see results.

Check Logs for Output

After a test, results appear inline. For full output, including your print() statements, open CloudWatch Logs where Lambda sends its runtime logs.

Quick Check: Lambda Deployment

You've just deployed your first Lambda! Let's check your understanding of the essential steps.

Recap: Your First Lambda

Congrats! You created, configured, coded, deployed, and tested your first Lambda function — the foundational skill for serverless apps.

Frequently asked questions

Is the “Your First Lambda Function” lesson free?

Yes — the full text of “Your First Lambda Function” is free to read here on the web, and the Serverless AWS Lambda Development course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Serverless AWS Lambda Development course, upgrade to CoddyKit PRO.

What will I learn in “Your First Lambda Function”?

Write, configure, and deploy a simple 'Hello World' Lambda function using the AWS console, gaining hands-on experience with the platform. You practise Serverless AWS Lambda Development with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Serverless AWS Lambda Development?

No prior experience is required. Serverless AWS Lambda Development on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Your First Lambda Function” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Serverless AWS Lambda Development lesson?

Yes. Every Serverless AWS Lambda Development lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. What is Serverless Computing?
  2. Getting Started with AWS Lambda
  3. Your First Lambda Function
  4. Serverless Pricing & the Free Tier
← Back to Serverless AWS Lambda Development