Feature: Temporal Serverless Workers (Pre-Release)
Vertical: E-Commerce / Retail
SDK: Go v1.42+
Compute: AWS Lambda
⚠️ PRE-RELEASE — In Dev
Serverless Workers is not yet available in production Temporal Cloud namespaces.
Pre-Release target: May 5, 2026 (Temporal Replay).
Run this demo against a local dev server or a dedicated demo namespace only.
Do NOT demo against a customer production account.
- Temporal Cloud - Staging: See if you have an account on the Staging portal - go here, try to log in with your temporal.io email address. If you get in, verify you have access to the
sa-demo-01.temporal-devnamespace. - SA AWS Account: Instructions here on how to access the SA AWS account - you'll want read only access if you're running the demo with the infra as-is, and Admin access if you want to set up a new Lambda.
- Obtain and save the cert information to connect to the namespace, and put the cert files in this folder - the
temporal.tomlfile is otherwise all set up to connect to the correct Temporal Cloud and correct namespace.
This is the recommended live demo flow. It shows a workflow running on a local worker as well as the same workflow running on a serverless worker.
In one terminal, start the local worker pointing at Temporal Cloud:
go run worker/main.goIn a second terminal, submit a workflow:
go run starter/main.goYou should see the workflow start and the local worker begin processing it.
Press Ctrl+C in the terminal running worker/main.go
Run the starter again to submit a new workflow (or observe the in-flight one resume):
go run starter/main.goThe Lambda is located here if you use the one that's already set up! During the demo, show the Monitor tab - this will show the executions of the Lambda.
It may also be useful to show the workers associated with the shopflow-orders task queue, you can find that view here.
The Worker Control Plane automatically invokes the Lambda function. The workflow completes on the serverless worker — no local process needed.
The punchline: Temporal's durable execution model means work is never lost when a worker goes down. And with serverless workers, you don't need to keep any process running at all — Lambda is invoked on demand and scales to zero when idle.
ShopFlow is a serverless order-fulfillment pipeline. An order workflow runs four activities (reserve inventory → charge customer → create shipment → notify customer) with automatic retry and saga-style compensation. The worker runs entirely on AWS Lambda — no long-lived processes, no Kubernetes, no scaling configuration. Temporal's Worker Control Plane invokes the Lambda function when there is work and lets it scale to zero when idle.
The "wow moment": After the workflow completes, open CloudWatch Metrics and show Lambda invocation count dropping to zero. Ask the customer: "How much are you spending on idle worker capacity today?"
shopflow-serverless/
├── workflows/
│ └── order_workflow.go # OrderWorkflow — deterministic orchestration
├── activities/
│ └── order_activities.go # ReserveInventory, ChargeCustomer, CreateShipment, NotifyCustomer
├── lambda/
│ └── main.go # AWS Lambda handler — uses lambdaworker.RunWorker (⭐ key API)
├── worker/
│ └── main.go # Standard long-lived Temporal worker (local dev / K8s)
├── starter/
│ └── main.go # Triggers a workflow execution (run locally)
├── temporal.toml # Connection profiles (default = local, staging = Temporal Cloud)
├── go.mod
└── README.md
| Tool | Version | Notes |
|---|---|---|
| Go | 1.24+ | Required by sdk-go v1.42 |
| AWS CLI | v2 | Configured with appropriate credentials |
zip |
any | For Lambda deployment package |
Both worker/main.go and starter/main.go load connection settings from temporal.toml
via envconfig.LoadClientOptions. The file uses the staging profile, which targets
Temporal Cloud Staging. The namespace connects via mTLS, so be sure to fill in the location of your certs in temporal.toml before running.
Everything is already set up to run this workflow on a Lambda worker. If you need to change the worker, see below re: how to rebuild and redeploy. PLEASE NOTE - if you change this, you change it for everyone who may be using this demo.
Lambda runs on Amazon Linux and is set up for x86_64. To build the (arm64 or x86_64). Cross-compile accordingly:
cd shopflow-serverless
# For x86_64, which is how the Lambda is set up:
GOOS=linux GOARCH=amd64 go build -o bootstrap ./lambda/The binary must be named
bootstrapfor theprovided.al2023runtime.
Environmental variables and certs are already set up for the Lambda in the SA AWS account!
zip function.zip bootstrapOn the Lambda page, upload the new ZIP and redeploy.
Lambda timeout guidance:
Set timeout to at least: max(activity StartToCloseTimeout) + 7s (worker stop timeout).
The activities in this demo have 2-minute timeouts, so a 5-minute (300s) Lambda timeout is appropriate. Minimum recommended: 60 seconds.
TBD
// go.temporal.io/sdk/contrib/aws/lambdaworker
lambdaworker.RunWorker(
worker.WorkerDeploymentVersion{
DeploymentName: "my-service", // logical name
BuildID: "v1.0.0", // maps to Lambda version/ARN
},
func(opts *lambdaworker.Options) error {
opts.TaskQueue = "my-queue"
opts.RegisterWorkflow(MyWorkflow)
opts.RegisterActivity(MyActivity)
return nil
},
)RunWorker handles the full per-invocation lifecycle:
- Dials Temporal Cloud using config from
temporal.toml/ env vars - Creates a worker with Lambda-tuned concurrency defaults
- Polls for tasks until the invocation deadline approaches
- Gracefully shuts down the worker and closes the client
Worker Deployment Versioning is always enabled — you do not need to configure it.
- AWS Lambda only. GCP Cloud Run is planned for a future release.
- 15-minute Lambda hard limit. Activities with
StartToCloseTimeout> 15 minutes require heartbeating + activity re-invocation patterns. The demo activities are well within limits. - No production SLA. Do not use in customer production namespaces during pre-release.
- Configuration interface may change. The Worker Deployment UI/API is pre-release and subject to breaking changes before GA.
- Pricing TBD. No incremental charge is planned for the initial release.