الإصدارات والأسماء المستعارة للإطلاقات الآمنة
تعلّم كيف تتيح لك إصدارات Lambda والأسماء المستعارة نشر إصدارات غير قابلة للتغيير، وتوجيه الزيارات إليها، وطرح التغييرات تدريجيًا.
الإصدارات والأسماء المستعارة للإطلاقات الآمنة درس مجاني في Serverless AWS Lambda Development على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Serverless AWS Lambda Development، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Serverless AWS Lambda Development 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Problem with $LATEST
Every function has a mutable $LATEST version. Deploying overwrites it instantly, leaving no easy rollback. Versions solve this.
Immutable Versions
Publishing creates a numbered, immutable snapshot of code and configuration. Version 3 will always be exactly what you published.
aws lambda publish-version \
--function-name ordersWhat an Alias Is
An alias is a named pointer to a version, such as prod or staging. Clients invoke the alias, and you re-point it without changing callers.
Creating an Alias
Create an alias that points to a specific version. Move it later to promote a new release.
aws lambda create-alias \
--function-name orders \
--name prod \
--function-version 3Invoking via Alias
Callers reference the alias by qualifier. The actual version is decided by the alias, decoupling clients from deploys.
aws lambda invoke \
--function-name orders:prod \
out.jsonWeighted Aliases
An alias can split traffic between two versions by weight, enabling canary deployments where a small percentage tries the new version.
aws lambda update-alias \
--function-name orders \
--name prod \
--function-version 4 \
--routing-config '{"AdditionalVersionWeights":{"3":0.9}}'Reading the Weight Config
In the example, version 4 receives 10 percent of traffic while version 3 keeps 90 percent. Increase the weight as confidence grows.
Instant Rollback
If the new version misbehaves, repoint the alias to the previous version. Rollback is immediate because old versions still exist.
Versioned Permissions
You can grant invoke permission on a specific alias, so staging callers cannot accidentally hit production code.
Environment Per Alias
Aliases can carry their own environment variable overrides, letting staging point at test resources while prod uses live ones.
Automate with CodeDeploy
AWS CodeDeploy can shift alias traffic automatically using canary or linear strategies, with CloudWatch alarms triggering automatic rollback.
Quick Check
Test your release knowledge.
Recap
You learned to publish immutable versions, point aliases at them, run weighted canary rollouts, and roll back instantly by re-pointing the alias.
الأسئلة الشائعة
هل درس «الإصدارات والأسماء المستعارة للإطلاقات الآمنة» مجاني؟
نعم — نص درس «الإصدارات والأسماء المستعارة للإطلاقات الآمنة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Serverless AWS Lambda Development، انتقل إلى CoddyKit PRO. تتضمن دورة Serverless AWS Lambda Development 4 دروس في المجموع.
ماذا ستتعلم في «الإصدارات والأسماء المستعارة للإطلاقات الآمنة»؟
تعلّم كيف تتيح لك إصدارات Lambda والأسماء المستعارة نشر إصدارات غير قابلة للتغيير، وتوجيه الزيارات إليها، وطرح التغييرات تدريجيًا. تتمرن على Serverless AWS Lambda Development مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Serverless AWS Lambda Development؟
لا تُشترط خبرة سابقة. Serverless AWS Lambda Development على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «الإصدارات والأسماء المستعارة للإطلاقات الآمنة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Serverless AWS Lambda Development هذا؟
نعم. كل درس في Serverless AWS Lambda Development يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- فهم بيئة تشغيل Lambda والطبقات
- متغيرات البيئة والتهيئة
- أدوار IAM لأمان Lambda
- الإصدارات والأسماء المستعارة للإطلاقات الآمنة