البدء باستخدام AWS Lambda
تعلّم التنقل في AWS Management Console، وإعداد أذونات IAM اللازمة، وفهم المكونات الأساسية لدالة Lambda
البدء باستخدام AWS Lambda درس مجاني في Serverless AWS Lambda Development على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Serverless AWS Lambda Development، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Serverless AWS Lambda Development 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Welcome to AWS Lambda!
Time for AWS Lambda, the serverless compute service that runs your code without any servers. You will find it in the console and learn its building blocks.
Finding Lambda in the Console
The AWS Management Console is your web interface for AWS. Search "Lambda" in the top bar and open it to reach the service dashboard.
Permissions: Why Lambda Needs Them
Your Lambda function is a tiny worker that needs permission to do anything useful. AWS controls this with IAM, granting your function an IAM role.
Understanding IAM Roles
An IAM Role is a permission set you assign to your function — a job description. Its trust policy says who can use it; its permissions policy says what it can do.
Creating a Lambda Execution Role
Every Lambda gets an execution role. The most basic one attaches AWSLambdaBasicExecutionRole so your function can write logs to CloudWatch.
Anatomy of a Lambda Function
A Lambda function is your code plus a few settings: a Runtime (the language), a Handler (the entry method), plus Memory and Timeout.
Runtime: Your Code's Engine
The Runtime tells Lambda which language environment to spin up when an event fires. Write in Java, pick a Java runtime like Java 17.
The Handler: Your Code's Entry Point
The Handler is the exact method Lambda invokes when your function is triggered — your logic's starting line. Here, Lambda calls handleRequest.
package com.example;
import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.RequestHandler;
// This class represents your Lambda function
public class MyFirstLambda implements RequestHandler<String, String> {
// The 'handleRequest' method is your function's entry point
@Override
public String handleRequest(String input, Context context) {
// Lambda's logger for output
context.getLogger().log("Received input: " + input);
String output = "Hello from Lambda, " + input + "!";
return output;
}
}Memory & Timeout Settings
Two settings shape speed and cost: Memory (more memory means more CPU and bandwidth) and Timeout (the max seconds before Lambda stops the run).
Quick Check!
Let's test your understanding of Lambda's foundational concepts.
Recap & Next Steps
Nice work! You found Lambda in the console and met IAM roles, runtime, handler, memory, and timeout. Next: deploy a real Hello World function.
الأسئلة الشائعة
هل درس «البدء باستخدام AWS Lambda» مجاني؟
نعم — نص درس «البدء باستخدام AWS Lambda» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Serverless AWS Lambda Development، انتقل إلى CoddyKit PRO. تتضمن دورة Serverless AWS Lambda Development 4 دروس في المجموع.
ماذا ستتعلم في «البدء باستخدام AWS Lambda»؟
تعلّم التنقل في AWS Management Console، وإعداد أذونات IAM اللازمة، وفهم المكونات الأساسية لدالة Lambda تتمرن على Serverless AWS Lambda Development مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Serverless AWS Lambda Development؟
لا تُشترط خبرة سابقة. Serverless AWS Lambda Development على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «البدء باستخدام AWS Lambda»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Serverless AWS Lambda Development هذا؟
نعم. كل درس في Serverless AWS Lambda Development يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- ما هي الحوسبة عديمة الخوادم؟
- البدء باستخدام AWS Lambda
- دالة Lambda الأولى
- تسعير الخدمات عديمة الخوادم والمستوى المجاني