Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ to docs, or any other relevant information.

## [Unreleased]

### Changed

- AWS Lambda worker `configure` parameter supports sync, async, and async
generator style functions. This callback is invoked on the asyncio event
loop.

### Breaking Changes

- AWS Lambda worker `configure` parameter has been changed to be invoked
per-invocation of the worker instead of only at startup. It is advised that
any shared, heavy-weight operations are performed outside of the callback
before `run_worker` is invoked.

## [1.29.0] - 2026-06-17

### Added
Expand Down
18 changes: 18 additions & 0 deletions temporalio/contrib/aws/lambda_worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ pre-populated with Lambda-appropriate defaults. Override any field directly in
the callback. The `task_queue` key in `worker_config` is pre-populated from the
`TEMPORAL_TASK_QUEUE` environment variable if set.

### Sync, async, and async-generator configure

The configure callback runs **once per invocation, inside that invocation's
event loop**, before the client connects. It may be:

- a plain function `def configure(config) -> None`;
- an `async def configure(config) -> None` coroutine — awaited for setup (pair
with `shutdown_hooks` for teardown);
- an `async def configure(config): ...; yield; ...` async generator — statements
before the single `yield` run before the client connects, the worker runs
while the generator is suspended at the `yield`, and statements after the
`yield` run as teardown once the worker has stopped.

The callback runs per invocation (rather than once at process start) because
event-loop-bound resources cannot be created before an event loop exists and
cannot be shared across invocations — each invocation runs under a fresh
`asyncio.run` loop.

## Lambda-tuned worker defaults

The package applies conservative concurrency limits suited to Lambda's resource
Expand Down
Loading
Loading