0Pricing
Serverless AWS Lambda Development · Aula

Sua primeira função Lambda

Escreva, configure e implante uma função Lambda simples de “Hello World” usando o console da AWS, adquirindo experiência prática com a plataforma.

Sua primeira função Lambda é uma aula grátis de Serverless AWS Lambda Development no CoddyKit. Esta é a aula 3 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Serverless AWS Lambda Development, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Serverless AWS Lambda Development inclui 4 aulas no total.

Partes desta aula ainda não foram traduzidas e aparecem em inglês.

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.

Perguntas Frequentes

A aula “Sua primeira função Lambda” é grátis?

Sim — o texto completo de “Sua primeira função Lambda” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Serverless AWS Lambda Development, atualize para CoddyKit PRO. O curso de Serverless AWS Lambda Development inclui 4 aulas no total.

O que vou aprender em “Sua primeira função Lambda”?

Escreva, configure e implante uma função Lambda simples de “Hello World” usando o console da AWS, adquirindo experiência prática com a plataforma. Você pratica Serverless AWS Lambda Development com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.

Preciso ter experiência prévia para começar Serverless AWS Lambda Development?

Nenhuma experiência prévia é necessária. Serverless AWS Lambda Development no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 3 de 4.

Quanto tempo leva a aula “Sua primeira função Lambda”?

A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.

Posso escrever e executar código nesta aula de Serverless AWS Lambda Development?

Sim. Cada aula de Serverless AWS Lambda Development inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.

Todas as aulas deste curso

  1. O que é computação sem servidor?
  2. Primeiros passos com o AWS Lambda
  3. Sua primeira função Lambda
  4. Preços sem Servidor e Camada Gratuita
← Voltar para Serverless AWS Lambda Development