cloud-native-aws-serverless
Use when the user asks about AWS Lambda internals, Firecracker microVMs, the execution environment lifecycle, concurrency limits, event source mappings…
от j4flmao★ 47 звёзд на GitHub
Установить cloud-native-aws-serverless в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
AWS Lambda Internals and Function Design
Purpose
Explain what actually happens when a Lambda function is invoked — Firecracker microVM isolation, the execution environment lifecycle, and the concurrency model — so that function code, timeouts, memory, and event-source settings are chosen from mechanics rather than folklore.
Agent Protocol
Trigger
"aws lambda internals", "firecracker", "lambda execution environment", "lambda concurrency", "event source mapping", "lambda function url", "lambda layers", "reserved concurrency", "lambda timeout".
Input Context
- Runtime and package type (ZIP managed runtime, container image, custom runtime).
- Invocation source (API Gateway, Function URL, SQS, Kinesis/DynamoDB Streams, EventBridge, S3).
- Traffic shape (steady, bursty), latency SLO, downstream limits (DB connections, third-party rate limits).
Output Artifact
Function configuration (IaC snippet) plus handler structure. No file unless requested.
Response Format
Invocation model: {sync|async|poll-based (ESM)}
Memory / timeout: {MB} / {s} (why)
Concurrency: {unreserved|reserved=N|provisioned=N}
Retries / failure destination: {...}
Handler notes: {init vs handler work}
Completion Criteria
- Invocation model identified and retry semantics stated.
- Timeout set below the caller's timeout (API Gateway integration timeout defaults to 29 s).
- Concurrency protects downstream dependencies.
- Failure path defined (DLQ, on-failure destination, or partial batch response).
How an Invocation Runs
- Firecracker microVM. Lambda runs each execution environment inside a Firecracker microVM on KVM. Firecracker exposes a minimal device model (virtio-net, virtio-block, serial console, keyboard for reset) and is documented to boot in about 125 ms with under 5 MiB memory overhead per microVM. Isolation boundary = the VM, not a container.
- Execution environment lifecycle (Lambda Runtime API phases):
INIT— download code/layers, start runtime, run extensions' init, run your module-level code. Limited to 10 s for on-demand functions; if it exceeds, init is retried inside the first invoke.INVOKE— handler runs; one environment processes one request at a time.SHUTDOWN— environment reclaimed after idle; the phase lasts 0 ms with no extensions, 500 ms with internal extensions, 2,000 ms with external extensions.
- Reuse. A warm environment is reused for later invocations; globals,
/tmp(512 MB default, configurable up to 10,240 MB), and open sockets survive. Never rely on reuse for correctness.
flowchart LR
Req[Invoke] --> FE[Frontend / Invoke service]
FE -->|warm env available| Env[Execution env in Firecracker microVM]
FE -->|none available| Init[INIT: runtime + module code] --> Env
Env --> Resp[Response]
Concurrency Model
- Concurrency = in-flight requests ≈ requests/second × average duration (s).
- Account default: 1,000 concurrent executions per Region (soft quota).
- Scaling rate: each function can add up to 1,000 concurrent executions every 10 seconds (current behaviour since late 2023; older "burst concurrency per Region" tables are obsolete).
- Reserved concurrency caps a function and guarantees that capacity; setting it to 0 throttles the function (useful kill switch).
- Provisioned concurrency keeps N initialized environments; billed while configured.
| Source | Invocation | Retries on error | Failure handling |
|---|---|---|---|
API Gateway, Function URL, SDK RequestResponse |
Sync | None (caller retries) | Return error to caller |
S3, SNS, EventBridge, SDK Event |
Async (internal queue) | 2 retries by default (0–2), max event age up to 6 h | On-failure destination or DLQ |
| SQS | Poll (ESM) | Until visibility timeout/maxReceiveCount | Queue redrive DLQ, ReportBatchItemFailures |
| Kinesis / DynamoDB Streams | Poll (ESM) | Until record expires unless limited | MaximumRetryAttempts, BisectBatchOnFunctionError, on-failure destination |
Function Configuration (Terraform)
resource "aws_lambda_function" "orders" {
function_name = "orders-api"
role = aws_iam_role.orders.arn
runtime = "python3.12"
handler = "app.handler"
filename = "build/orders.zip"
source_code_hash = filebase64sha256("build/orders.zip")
architectures = ["arm64"] # Graviton: usually cheaper per GB-s
memory_size = 1024 # CPU scales with memory (1 vCPU ≈ 1,769 MB)
timeout = 25 # below API Gateway's 29 s integration timeout
reserved_concurrent_executions = 200 # protects the database
environment {
variables = { TABLE_NAME = aws_dynamodb_table.orders.name }
}
tracing_config { mode = "Active" }
}
resource "aws_lambda_event_source_mapping" "queue" {
event_source_arn = aws_sqs_queue.jobs.arn
function_name = aws_lambda_function.worker.arn
batch_size = 10
function_response_types = ["Report
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cloud-native-aws-serverless?
Use when the user asks about AWS Lambda internals, Firecracker microVMs, the execution environment lifecycle, concurrency limits, event source mappings, function URLs, layers, or Lambda timeouts. Produces correct Lambda function design and configuration. Not for cold-start tuning (use cloud-native-serverless-cold-starts) or Step Functions (use cloud-native-serverless-orchestration).
Как установить скилл cloud-native-aws-serverless?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cloud-native-aws-serverless запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…