Skip to content

Conversation

@bchampp
Copy link
Member

@bchampp bchampp commented Oct 16, 2025

Issue #, if available:
#42 - pre-req for hitting it through web server.

Description of changes:
Updating the request handling for SendDurableExecutionCallbackSuccess and SendDurableExecutionCallbackFailure. Both of these requests accept their Result and Error fields as @httpPayload, meaning they get serialized to a raw bytes body instead of JSON.

I'm following the same convention as how we deserialize .from_dict() for checkpoints where we pass the execution arn from the path to .from_dict() - except using the callback id.

I tested it by using the AWS CLI and sending requests to the local server and ensuring that the requests were being deserialized properly.

Success:

aws lambda send-durable-execution-callback-success --callback-id my-callback --endpoint-url "http://localhost:5000" --result "$(echo -n 'hello world' | base64)"

...
DEBUG - Callback my-callback succeeded with result: hello world

Failure:

aws lambda send-durable-execution-callback-failure \
  --callback-id "my-callback" \       
  --error '{
    "ErrorType": "TimeoutError",
    "ErrorMessage": "Task failed due to timeout",
    "ErrorData": "Additional error context",
    "StackTrace": ["line 1", "line 2"]
  }' \
  --endpoint-url http://localhost:5000

...
DEBUG - Callback my-callback failed with error: ErrorObject(message='Task failed due to timeout', type='TimeoutError', data='Additional error context', stack_trace=['line 1', 'line 2'])

Dependencies

If this PR requires testing against a specific branch of the Python Language SDK (e.g., for unreleased changes), uncomment and specify the branch below. Otherwise, leave commented to use the main branch.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bchampp bchampp force-pushed the feat/callback-binary-body-parsing branch from 6603748 to c128fe0 Compare October 17, 2025 16:33
@bchampp bchampp force-pushed the feat/callback-binary-body-parsing branch from c128fe0 to ee4a67f Compare October 17, 2025 16:37
@bchampp bchampp merged commit 8f3feb5 into main Oct 17, 2025
13 of 14 checks passed
@bchampp bchampp deleted the feat/callback-binary-body-parsing branch October 17, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants