Skip to content

Commit

Permalink
serialize response
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbalcaen committed Apr 19, 2024
1 parent 3df5bd4 commit 16afea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lambdas/step_function_invoker/src/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def lambda_handler(event, context):
The state machine arn is defined in the environment variable STATE_MACHINE_ARN.
"""
logger.info(event)

try:

state_machine_execution_result = step_functions_client.start_execution(
stateMachineArn=STATE_MACHINE_ARN,
# default to str to get around the datetime serialization issue
Expand All @@ -38,7 +38,7 @@ def lambda_handler(event, context):
logger.info(state_machine_execution_result)
return {
"statusCode": 200,
"body": json.dumps(state_machine_execution_result),
"body": json.dumps(state_machine_execution_result, default=json_serializer),
}

except (ParamValidationError, TypeError, Exception) as e:
Expand Down

0 comments on commit 16afea6

Please sign in to comment.