Sample for AWS Lambda#784
Conversation
ab48549 to
35487c6
Compare
| io.temporal.samples.lambdaworker.LambdaFunction::handleRequest | ||
| ``` | ||
|
|
||
| ## Configure Environment |
There was a problem hiding this comment.
Should this section also explain how to use otel-collector-config.template.yaml?
| AssumeRolePolicyDocument: | ||
| Version: "2012-10-17" | ||
| Statement: | ||
| - Effect: Allow |
There was a problem hiding this comment.
I didn't run this part myself, but Codex thinks there's an issue:
The README says the tutorial supports either Temporal Cloud or self-hosted Temporal, but the invocation role trusts fixed
Temporal Cloud AWS principals at lambda-worker/deploy/iam-role-for-temporal-lambda-invoke-test.yaml:48. That template will not configure self-hosted Worker Controller credentials. Temporal’s guide explicitly gives self-hosting a separate setup
and requires Temporal Service 1.31.0 or later.
| export FUNCTION_ARN="$( | ||
| aws lambda get-function \ | ||
| --function-name "$FUNCTION_NAME" \ | ||
| --query 'Configuration.FunctionArn' \ | ||
| --output text | ||
| )" |
There was a problem hiding this comment.
FWIW Codex complains here, though I don't understand what it's talking about. In case it's useful to you:
README claims Worker Deployment Versioning but uses mutable Lambda code.
The tutorial obtains an unqualified function ARN at lambda-worker/README.md:151, then associates that with a Temporal Build ID at lambda-worker/README.md:193. The update script later replaces the code behind that same ARN without changing the Build ID.
That undermines the immutability and rollback guarantees readers normally expect from Worker Deployment Versioning. Temporal recommends publishing an immutable Lambda version and assigning its qualified ARN to each distinct Build ID. Unqualified ARNs are acceptable for development, but the tutorial should identify that trade-off explicitly.
Co-authored-by: Dan Plyukhin <dplyukhin@gmail.com>
Co-authored-by: Dan Plyukhin <dplyukhin@gmail.com>
Co-authored-by: Dan Plyukhin <dplyukhin@gmail.com>
What was changed
Added sample for AWS Lambda
Why?
Checklist
Depends on AWS Lambda (Java) sdk-java#2901
Closes
How was this tested:
Deployed a lambda worker to my sandbox AWS account and Temporal cloud.
Any docs updates needed?