docs: Serverless Workers - Deploy guide (3/4)#4416
docs: Serverless Workers - Deploy guide (3/4)#4416lennessyy merged 2 commits intofeat/serverless-worker-prereleasefrom
Conversation
Add deploy guide for serverless workers covering AWS Lambda deployment, including the serverless-workers index and aws-lambda pages under production-deployment/worker-deployments. Update sidebar navigation and set onBrokenLinks/onBrokenAnchors to warn for cross-PR references. Part of #4405. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📖 Docs PR preview links
|
| ## Prerequisites {#prerequisites} | ||
|
|
||
| - A Temporal Cloud account or a self-hosted Temporal Service vx.xx.x or later. | ||
| - Your Temporal Service frontend must be reachable from the Lambda execution environment. For Temporal Cloud, no additional configuration is needed. For self-hosted deployments on a private network, configure the Lambda function with [VPC access](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html) to reach the Temporal frontend. |
There was a problem hiding this comment.
Right now, I see that we need to add specific dynamic config parameters in Temporal server to enable this feature. When we ship, do self-hosted or cloud users need to do anything to enable it?
In the same vein, the WCI component readme mentions a scaling algorithm. Is this something users need to worry about? If so, what are the considerations? If not, can we still give a brief explanation of how it works and expected scaling behavior?
There was a problem hiding this comment.
@smuneebahmad Let's sync on what we say about the self-managed scaling algo
| | `TEMPORAL_TLS_CERT` | TLS client certificate content for mTLS authentication. | For mTLS | | ||
| | `TEMPORAL_TLS_KEY` | TLS client key content for mTLS authentication. | For mTLS | |
There was a problem hiding this comment.
The env var names should be:
TEMPORAL_TLS_CLIENT_CERT_PATH
TEMPORAL_TLS_CLIENT_KEY_PATH
| --zip-file fileb://function.zip \ | ||
| --timeout 60 \ | ||
| --memory-size 256 \ | ||
| --environment "Variables={TEMPORAL_ADDRESS=<your-temporal-address>:7233,TEMPORAL_NAMESPACE=<your-namespace>}" |
There was a problem hiding this comment.
We also need the following Env key-value pairs set on the Lambda:
Key: HOME
Value: /tmp
Additionally, we should also either include the TLS env var options or API key env var in this command.
| --> | ||
|
|
||
| ```yaml | ||
| # CloudFormation template coming soon |
There was a problem hiding this comment.
Sample usage:
aws cloudformation create-stack \
--stack-name <StackName> \
--template-body file://temporal-invoke-role.yaml \
--parameters \
ParameterKey=AssumeRoleExternalId,ParameterValue=<ExternalId> \
ParameterKey=LambdaFunctionARNs,ParameterValue='"<LambdaFunctionArn>"' \
--capabilities CAPABILITY_NAMED_IAM \
--region <AWS_REGION>
| --deployment-name my-app \ | ||
| --build-id build-1 \ | ||
| --aws-lambda-invoke arn:aws:lambda:<REGION>:<ACCOUNT_ID>:function:my-temporal-worker \ | ||
| --scaler-min-instances 0 \ |
There was a problem hiding this comment.
We can remove the min and max scalar options
| temporal worker deployment set-current-version \ | ||
| --deployment-name my-app \ | ||
| --build-id build-1 \ | ||
| --ignore-missing-task-queues |
There was a problem hiding this comment.
--ignore-missing-task-queues flag is not required for serverless workers
- Rename TLS env vars to TEMPORAL_TLS_CLIENT_CERT_PATH and TEMPORAL_TLS_CLIENT_KEY_PATH (smuneebahmad) - Add HOME=/tmp env var to deploy command and env var table; needed for the SDK's config loader to resolve a user config directory in Lambda (smuneebahmad) - Include TEMPORAL_API_KEY in deploy command so the auth path is complete (smuneebahmad) - Remove --scaler-min-instances, --scaler-max-instances from create-version snippet (smuneebahmad) - Remove --ignore-missing-task-queues from set-current-version snippet (smuneebahmad) - Replace CloudFormation template stub with the real template from smuneebahmad, inline in a <details> block plus a downloadable file at /files/temporal-cloud-serverless-worker-role.yaml - Update IAM parameter table to match real template params (AssumeRoleExternalId, LambdaFunctionARNs, RoleName) - Add note flagging template is Cloud-scoped; self-hosted TBD - Add sample aws cloudformation create-stack usage - Use "invocation deadline" for consistency with Go SDK page Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0ba4c57
into
feat/serverless-worker-prerelease
| |---|---|---| | ||
| | `TEMPORAL_ADDRESS` | Temporal frontend address (e.g., `<namespace>.<account>.tmprl.cloud:7233`). | Yes | | ||
| | `TEMPORAL_NAMESPACE` | Temporal Namespace. | Yes | | ||
| | `HOME` | Must be set to `/tmp` so the SDK's config loader can resolve a user config directory in the Lambda environment. | Yes | |
There was a problem hiding this comment.
This shouldn't be true. Where'd this come from?
There was a problem hiding this comment.
Muneeb told me to add this in a comment earlier--is the reasoning here wrong?
Summary
production-deployment/worker-deployments/serverless-workers/index.mdx- Serverless Workers deploy overviewaws-lambda.mdx- AWS Lambda deployment guideworker-deployments/index.mdxwith serverless workers linkonBrokenLinksandonBrokenAnchorstowarn(cross-references to pages in other split PRs)Part 3 of 4 in splitting #4405 into smaller PRs.
Test plan
🤖 Generated with Claude Code
┆Attachments: EDU-6188 docs: Serverless Workers - Deploy guide (3/4)