You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Durable execution experience with 'sam local invoke' is confusing and user unfriendly #9200
When you invoke a durable function without --durable-execution-name (or even if you do), the execution ARN is not printed anywhere. You have to run sam local invoke with --debug to even see it (but this can be incredibly noisy). For that matter, there's no SAM CLI to simply list local invocations. So the discoverability isn't good.
Even if you use --durable-execution-name, some of the other sam local commands (like execution history and execution get) do not seem to work with that name. There are numerous articles (probably AI written) on the Internet, as well as LLMs (I tried 2 separate ones and they both gave the same hallucinated answer) suggesting the opposite, but it doesn't seem to work for me. It's possible that those articles are entirely in error and it was only ever meant to take an execution ID. To be fair, the AWS docs (and the CLI help itself) are not particularly clear on this point.
Steps to reproduce:
Build the app: sam build --beta-features --template path/to/template.yaml --build-dir .aws-sam/build/myfunc (in my case, I use --beta-features to get the python-uv build method enabled so I can use a pyproject.toml)
Invoke the function: sam local invoke --template path/to/template.yaml --durable-execution-name test MyFunc --event path/to/event.json --region us-east-1. The function starts. In my case, there's a context.wait in the function to keep it alive.
In a separate terminal run sam local execution history test. It errors saying: "Error: An error occurred (404) when calling the GetDurableExecutionHistory operation: Execution test not found"
Cancel out of the function invocation and launch it with --debug. The execution ID is printed. Now run sam local execution history on this execution ID and it works.
Expected result:
Either:
The sam local invoke explicitly shows the execution ID somewhere in the output (without having to resort to --debug)
There's some new command or behavior in sam local execution that let's me simply list the executions in progress.
Allow --durable-function-name to automatically derive the latest execution
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
$ sam local invoke HelloWorld --no-event
Invoking hello_world.hello_world.handler (python3.13)
Using local image: public.ecr.aws/lambda/python:3.13-rapid-x86_64.
Durable execution started
=========================
ARN: 26af376b-5300-40ae-8e79-fe1032020f4f/77e70d5f-78b8-4c3f-a00f-6e2fcc8143f7
START RequestId: 0cb95694-e145-4a9a-aa40-2d4662ea68b1 Version: $LATEST
END RequestId: 0cb95694-e145-4a9a-aa40-2d4662ea68b1
REPORT RequestId: 0cb95694-e145-4a9a-aa40-2d4662ea68b1 Duration: 8101.15 ms Billed Duration: 8102 ms
Execution Summary:
=========================
ARN: 26af376b-5300-40ae-8e79-fe1032020f4f/77e70d5f-78b8-4c3f-a00f-6e2fcc8143f7
Status: SUCCEEDED ✅
...
Commands you can use next
=========================
[*] Get execution details: sam local execution get 26af376b-...
[*] View execution history: sam local execution history 26af376b-...
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Activity
roger-zhangg commentedon Aug 26, 2026
Thanks for reporting @jcmcken , we are taking a look
fix(local): show durable execution ARN as soon as the execution starts
fix(local): show durable execution ARN as soon as the execution starts (
roger-zhangg commentedon Sep 4, 2026
Please checkout our new version: https://github.com/aws/aws-sam-cli/releases/tag/v1.166.1
Following UX for reference.
github-actions commentedon Sep 4, 2026
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.