serverless-worker-aws
БесплатноБез исполняемых скриптовНе проверенSet up the AWS side of a Temporal serverless worker — IAM role, Lambda function, and deploy — so the Worker Controller can scale workers from zero and you can…
от temporalio★ 452 звезды на GitHubОб этом скилле
Serverless Worker AWS Setup
Serverless worker deployments let the Worker Controller Instance (WCI) invoke an AWS Lambda when a task queue has backlog, so workers scale to zero when idle. Testing the UI's serverless deployment flows needs a real Lambda and IAM role behind them.
The worker itself lives in temporalio/temporal-serverless-worker — a Go Lambda that connects back to Temporal, polls a task queue, runs for 60 seconds, then exits. This skill covers the AWS setup that repo depends on and how it connects to the UI.
How the pieces fit
Temporal (staging or local)
└─ Worker Controller Instance
├─ sees backlog on the task queue
├─ assumes the IAM role via STS (with external ID)
└─ invokes the Lambda
│
▼
AWS Lambda (Go worker)
│ connects back over mTLS (staging) or plaintext gRPC (local)
▼
Temporal frontend — polls, executes, self-terminates after 60s
Two values must agree in three places: DEPLOYMENT_NAME and BUILD_ID are set as Lambda environment variables, entered in the UI's Create Serverless Deployment form, and used by the worker to register its version. A mismatch means the Lambda runs and polls, but its work never lands under the deployment version you are looking at.
Part 1 — AWS setup (one-time)
1.1 Create the IAM role
The Temporal server assumes this role to invoke your Lambda.
Trust policy — replace ACCOUNT_ID, YOUR_USER, and pick any string for YOUR_EXTERNAL_ID:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::ACCOUNT_ID:user/YOUR_USER"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "YOUR_EXTERNAL_ID"
}
}
}
]
}
The external ID condition is not optional — workercontroller.compute_providers.aws.require_role_and_external_id defaults to true, and the WCI rejects role assumption without it. You reuse YOUR_EXTERNAL_ID verbatim in the UI form.
Permissions policy — attach inline:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "lambda:InvokeFunction",
"Resource": "arn:aws:lambda:us-east-1:ACCOUNT_ID:function:YOUR_FUNCTION_NAME"
}
]
}
Keep the role ARN — arn:aws:iam::ACCOUNT_ID:role/YOUR_ROLE_NAME.
1.2 Let your own user assume it
Attach to your IAM user:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::ACCOUNT_ID:role/YOUR_ROLE_NAME"
}
]
}
1.3 Create the Lambda function
| Setting | Value |
|---|---|
| Runtime | Amazon Linux 2023 (provided.al2023) |
| Handler | bootstrap |
| Architecture | x86_64 (matches LAMBDA_ARCH=amd64) |
| Timeout | 75 seconds |
The timeout must exceed 60 seconds. The worker self-terminates on a one-minute timer; a 60-second Lambda timeout kills it before it exits cleanly. 75 gives margin.
Keep the function ARN — arn:aws:lambda:us-east-1:ACCOUNT_ID:function:YOUR_FUNCTION_NAME.
1.4 Configure and deploy the worker
Clone the worker repo, copy .env.example to .env, and fill it in. scripts/deploy.sh builds the Go binary, uploads it, and sets the Lambda environment variables from that one file — you do not set them by hand in the console.
git clone https://github.com/temporalio/temporal-serverless-worker
cd temporal-serverless-worker
cp .env.example .env
# fill in .env, then:
bash scripts/deploy.sh
The values that matter:
.env variable |
Purpose |
|---|---|
LAMBDA_ARN |
Function to deploy to; the function name is derived from it |
IAM_ROLE_ARN, EXTERNAL_ID |
Entered in the UI form, not used by the Lambda itself |
LAMBDA_ARCH |
amd64 for x86_64, arm64 for Graviton — must match the function |
TQ_NAME |
Task queue the worker polls |
DEPLOYMENT_NAME, BUILD_ID |
Must match the UI form exactly |
TEMPORAL_ADDRESS, TEMPORAL_NAMESPACE |
Target server; take preced |
Установить serverless-worker-aws в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл serverless-worker-aws?
Set up the AWS side of a Temporal serverless worker — IAM role, Lambda function, and deploy — so the Worker Controller can scale workers from zero and you can exercise serverless worker deployments in the UI. Use when asked how to create the Lambda or IAM role for serverless workers, what to put in the Create Serverless Deployment form, or why an invoked Lambda never connects.
Как установить скилл serverless-worker-aws?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл serverless-worker-aws запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies 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…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic