Serverless Workers Interactive Demo
Serverless Workers are in Pre-release and available to select Temporal Cloud customers. To request access during Pre-release, create a support ticket or contact your account team. APIs are experimental and may be subject to backwards-incompatible changes. Sign up for updates to be notified when Serverless Workers reach Public Preview.
Serverless Workers let you run Temporal Workers on serverless compute like AWS Lambda. There are no long-lived processes to provision or scale. Temporal Cloud invokes your Worker when Tasks arrive, and the Worker shuts down when the work is done.
Use the interactive demo below to explore how the configuration options affect the generated Worker code, deployment script, and CLI commands. Click "Start Workflow" to simulate the end-to-end Serverless Worker invocation flow.
Serverless Worker Flow
Execution Log
Configuration
Step-by-step walkthrough
Step 1: Worker Code
package main
import (
lambdaworker "go.temporal.io/sdk/contrib/aws/lambdaworker"
"go.temporal.io/sdk/worker"
"go.temporal.io/sdk/workflow"
)
func main() {
lambdaworker.RunWorker(worker.WorkerDeploymentVersion{
DeploymentName: "my-app",
BuildID: "build-1",
}, func(opts *lambdaworker.Options) error {
opts.TaskQueue = "serverless-task-queue"
opts.RegisterWorkflowWithOptions(MyWorkflow, workflow.RegisterOptions{
VersioningBehavior: workflow.VersioningBehaviorPinned,
})
opts.RegisterActivity(MyActivity)
return nil
})
}
Next steps
- Serverless Workers for concepts, autoscaling, and lifecycle details.
- Deploy a Serverless Worker for the full end-to-end deployment guide.