[Feature]: [Testing] Emulator should generate real-shaped durable execution ARNs (embed execution name)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start in packages/aws-durable-execution-sdk-python-testing/src/aws_durable_execution_sdk_python_testing/execution.py at Execution.new(), then inspect executor.py's GetDurableExecution response and Route.from_string. Update tests that assert the placeholder ARN shape, and verify generated ARNs include the required function, qualifier, execution name, and fresh execution ID while absent names are handled consistently.
Written by the indexing model from the issue text.
Description
What would you like?
Context
Reported downstream in aws/aws-sam-cli#9200: a user who starts a local durable execution with sam local invoke --durable-execution-name test cannot correlate that name with anything afterwards — sam local execution history/get take an ARN, and the emulator's ARN contains no trace of the name.
Current behavior
The emulator generates a placeholder ARN in Execution.new() (execution.py):
# make a nicer arn
# Pattern: arn:(aws[a-zA-Z-]*)?:lambda:...:durable-execution:...
return Execution(
durable_execution_arn=str(uuid4()) + "/" + (input.invocation_id or str(uuid4())),
...
)
Two problems:
- It doesn't match the real service ARN shape, so the execution name (and function name) appear nowhere in the identifier. Locally,
DurableExecutionNameis effectively write-only. - It conflates the second path segment with the invocation ID; the real ARN's last segment is a distinct execution ID.
(The comment's intended pattern is also stale — it predates the current public API shape.)
Expected behavior
Generate ARNs matching the public DurableExecutionArn pattern from the Lambda service model:
arn:{partition}:lambda:{region}:{account}:function:{name}:{qualifier}/durable-execution/{execution-name}/{execution-id}
Everything needed is already on StartDurableExecutionInput (account_id, function_name, function_qualifier, execution_name are required fields). Region can be fixed to us-east-1, consistent with the hardcoded FunctionArn in executor.py's GetDurableExecution response.
Possible Implementation
- Null/omitted execution name: callers (e.g. SAM CLI) may send
"ExecutionName": null. Generate a name (uuid) when absent — matches cloud behavior and also fixesDurableExecutionNamebeing null inGetDurableExecutionresponses. - Execution ID: use a fresh
uuid4(), notinvocation_id. - Routing is already safe:
Route.from_stringsplits on/before URL-decoding, so a percent-encoded ARN stays one segment — the same mechanism that handles today's one-slash placeholder. botocore percent-encodes/in non-greedy URI params. - Downstream (sam-cli) is already shape-agnostic after aws/aws-sam-cli#9038 and aws/aws-sam-cli#9040 (
\S+ARN regex, Flask<path:>routes). - Store/runner treat the ARN as an opaque key; only tests asserting the placeholder shape need updating.
Questions to resolve:
- Execution-name idempotency: mimic cloud idempotency behaviour — in the service, starting a durable execution with an
ExecutionNamethat matches an existing execution for the same function is an idempotent start (the existing execution/ARN is returned rather than a new one created). The emulator currently creates a duplicate with a distinct ARN sharing the same name segment. Confirm the exact service semantics (idempotency window, retention, input-mismatch handling) and implement to match. - Function name fidelity: SAM CLI hardcodes
"FunctionName": "function"in its start payload, so local ARNs would readfunction:function:$LATEST/.... Decide whether to pair this with a sam-cli change to pass the real logical ID so the ARN is actually informative.
Blocked by
A new emulator image release is required for this to reach SAM CLI users (:latest on ECR is still v1.2.1, built 2026-05-20 from the pre-migration repo) — see #487.
- Dominant language
- Python
- Stars
- 59
- Forks
- 32
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 76
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-durable-execution-sdk-python
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws/aws-durable-execution-sdk-python#977 ·
Maintainers usually reply within 1 day
-
[AgentCore session] Remove the unused session timeoutPossibly taken @srivilliamsai claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
aws/aws-durable-execution-sdk-python#970 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-durable-execution-sdk-python#952 ·
Maintainers usually reply within 1 day
-
[AgentCore session] W4: Document sessions in the worker READMEPossibly taken @ParidelPooya claimed this 3 days ago. Openenhancement needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
aws/aws-durable-execution-sdk-python#950 ·
Maintainers usually reply within 1 day
-
[AgentCore session] W3: Add the session ID and job count to worker logsPossibly taken @ParidelPooya claimed this 3 days ago. Openenhancement needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws/aws-durable-execution-sdk-python#949 ·
Maintainers usually reply within 1 day
All issues in aws/aws-durable-execution-sdk-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Unused loot bag group names left in dreamcraft en_US.langPossibly taken A pull request linked to this issue is open or already merged. OpenStatus: Triage Suggestion
Difficulty 1/5 Under an hour Newbie friendliness 90/100
GTNewHorizons/GT-New-Horizons-Modpack#27789 ·
Maintainers usually reply within 1 day
-
bug frontend sev-5
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
core good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
b4b code health next
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ESCOMP/CTSM#4330 · 1 comment ·
Maintainers usually reply within 1 day