Skip to main content

Serverless Workers

View Markdown

Serverless Workers let you run Temporal Workers on serverless compute. Deploy your Worker code to a serverless provider, configure a compute provider for the Worker Deployment Version, and Temporal starts and stops Workers in response to work on the Task Queue. There is no always-on Worker fleet to provision or scale.

Temporal monitors Task Queues that have a compute provider configured. When a Task arrives and no Worker is free to take it, the Worker Controller Instance (WCI) starts compute. How it starts compute is where the providers differ. On AWS Lambda and AgentCore Runtime, the WCI invokes compute in response to unmet Task Queue demand. On GCP Cloud Run, it resizes a Worker Pool of long-lived instances that poll continuously.

Supported providers

  • AWS Lambda - Deploy a Serverless Worker as a Lambda function. Temporal assumes an IAM role in your AWS account to invoke the function when Tasks arrive.
  • GCP Cloud Run - Deploy a Serverless Worker to a Cloud Run Worker Pool. Temporal impersonates a service account in your GCP project to scale the pool as Tasks arrive and drain.
  • Amazon Bedrock AgentCore Runtime - Deploy a Serverless Worker to AgentCore Runtime. Temporal assumes an IAM role in your AWS account to invoke the Runtime endpoint as Tasks arrive.