start_sync_execution

start_sync_execution(**kwargs)

Starts a Synchronous Express state machine execution. StartSyncExecution is not available for STANDARD workflows.

Note

StartSyncExecution will return a 200 OK response, even if your execution fails, because the status code in the API response doesn't reflect function errors. Error codes are reserved for errors that prevent your execution from running, such as permissions errors, limit errors, or issues with your state machine code and configuration.

Note

This API action isn't logged in CloudTrail.

See also: AWS API Documentation

Request Syntax

response = client.start_sync_execution(
    stateMachineArn='string',
    name='string',
    input='string',
    traceHeader='string'
)
Parameters
  • stateMachineArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the state machine to execute.

  • name (string) -- The name of the execution.
  • input (string) --

    The string that contains the JSON input data for the execution, for example:

    "input": "{\"first_name\" : \"test\"}"

    Note

    If you don't include any JSON input data, you still must include the two braces, for example: "input": "{}"

    Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

  • traceHeader (string) -- Passes the X-Ray trace header. The trace header can also be passed in the request payload.
Return type

dict

Returns

Response Syntax

{
    'executionArn': 'string',
    'stateMachineArn': 'string',
    'name': 'string',
    'startDate': datetime(2015, 1, 1),
    'stopDate': datetime(2015, 1, 1),
    'status': 'SUCCEEDED'|'FAILED'|'TIMED_OUT',
    'error': 'string',
    'cause': 'string',
    'input': 'string',
    'inputDetails': {
        'included': True|False
    },
    'output': 'string',
    'outputDetails': {
        'included': True|False
    },
    'traceHeader': 'string',
    'billingDetails': {
        'billedMemoryUsedInMB': 123,
        'billedDurationInMilliseconds': 123
    }
}

Response Structure

  • (dict) --

    • executionArn (string) --

      The Amazon Resource Name (ARN) that identifies the execution.

    • stateMachineArn (string) --

      The Amazon Resource Name (ARN) that identifies the state machine.

    • name (string) --

      The name of the execution.

    • startDate (datetime) --

      The date the execution is started.

    • stopDate (datetime) --

      If the execution has already ended, the date the execution stopped.

    • status (string) --

      The current status of the execution.

    • error (string) --

      The error code of the failure.

    • cause (string) --

      A more detailed explanation of the cause of the failure.

    • input (string) --

      The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

    • inputDetails (dict) --

      Provides details about execution input or output.

      • included (boolean) --

        Indicates whether input or output was included in the response. Always true for API calls.

    • output (string) --

      The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.

      Note

      This field is set only if the execution succeeds. If the execution fails, this field is null.

    • outputDetails (dict) --

      Provides details about execution input or output.

      • included (boolean) --

        Indicates whether input or output was included in the response. Always true for API calls.

    • traceHeader (string) --

      The X-Ray trace header that was passed to the execution.

    • billingDetails (dict) --

      An object that describes workflow billing details, including billed duration and memory use.

      • billedMemoryUsedInMB (integer) --

        Billed memory consumption of your workflow, in MB.

      • billedDurationInMilliseconds (integer) --

        Billed duration of your workflow, in milliseconds.

Exceptions

  • SFN.Client.exceptions.InvalidArn
  • SFN.Client.exceptions.InvalidExecutionInput
  • SFN.Client.exceptions.InvalidName
  • SFN.Client.exceptions.StateMachineDoesNotExist
  • SFN.Client.exceptions.StateMachineDeleting
  • SFN.Client.exceptions.StateMachineTypeNotSupported