Repository: getmoto/moto

Issue:
Include ability to add input to Step Function Execution (and have it returned in describe_execution)
**TL;DR** Moto should actually handle `input` for the Execution model [here](https://github.com/spulec/moto/blob/master/moto/stepfunctions/models.py#L29-L47)

@bblommers I intend on implementing this, just raising the issue so I can A: link the PR to something and B: not forget I need to do this 🤣 

I'm planning on adding `input` as a property of `Execution` and implementing this back into [describe_execution](https://github.com/spulec/moto/blob/master/moto/stepfunctions/responses.py#L126-L141)

This is so that when a user runs `describe_execution` against a moto Step Function, they get something like [this](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/stepfunctions.html#SFN.Client.describe_execution):
```
{
    'executionArn': 'string',
    'stateMachineArn': 'string',
    'name': 'string',
    'status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'ABORTED',
    'startDate': datetime(2015, 1, 1),
    'stopDate': datetime(2015, 1, 1),
    'input': 'string',
    'output': 'string'
}
```


Discussion:

Resolving patch:
diff --git a/moto/stepfunctions/models.py b/moto/stepfunctions/models.py
--- a/moto/stepfunctions/models.py
+++ b/moto/stepfunctions/models.py
@@ -34,6 +34,7 @@ def __init__(
         state_machine_name,
         execution_name,
         state_machine_arn,
+        execution_input,
     ):
         execution_arn = "arn:aws:states:{}:{}:execution:{}:{}"
         execution_arn = execution_arn.format(
@@ -43,6 +44,7 @@ def __init__(
         self.name = execution_name
         self.start_date = iso_8601_datetime_without_milliseconds(datetime.now())
         self.state_machine_arn = state_machine_arn
+        self.execution_input = execution_input
         self.status = "RUNNING"
         self.stop_date = None
 
@@ -204,7 +206,7 @@ def delete_state_machine(self, arn):
         if sm:
             self.state_machines.remove(sm)
 
-    def start_execution(self, state_machine_arn, name=None):
+    def start_execution(self, state_machine_arn, name=None, execution_input=None):
         state_machine_name = self.describe_state_machine(state_machine_arn).name
         self._ensure_execution_name_doesnt_exist(name)
         execution = Execution(
@@ -213,6 +215,7 @@ def start_execution(self, state_machine_arn, name=None):
             state_machine_name=state_machine_name,
             execution_name=name or str(uuid4()),
             state_machine_arn=state_machine_arn,
+            execution_input=execution_input,
         )
         self.executions.append(execution)
         return execution
diff --git a/moto/stepfunctions/responses.py b/moto/stepfunctions/responses.py
--- a/moto/stepfunctions/responses.py
+++ b/moto/stepfunctions/responses.py
@@ -95,8 +95,11 @@ def list_tags_for_resource(self):
     def start_execution(self):
         arn = self._get_param("stateMachineArn")
         name = self._get_param("name")
+        execution_input = self._get_param("input", if_none="{}")
         try:
-            execution = self.stepfunction_backend.start_execution(arn, name)
+            execution = self.stepfunction_backend.start_execution(
+                arn, name, execution_input
+            )
         except AWSError as err:
             return err.response()
         response = {
@@ -129,7 +132,7 @@ def describe_execution(self):
             execution = self.stepfunction_backend.describe_execution(arn)
             response = {
                 "executionArn": arn,
-                "input": "{}",
+                "input": execution.execution_input,
                 "name": execution.name,
                 "startDate": execution.start_date,
                 "stateMachineArn": execution.state_machine_arn,


Test patch:
diff --git a/tests/test_stepfunctions/test_stepfunctions.py b/tests/test_stepfunctions/test_stepfunctions.py
--- a/tests/test_stepfunctions/test_stepfunctions.py
+++ b/tests/test_stepfunctions/test_stepfunctions.py
@@ -1,8 +1,8 @@
 from __future__ import unicode_literals
 
 import boto3
+import json
 import sure  # noqa
-import datetime
 
 from datetime import datetime
 from botocore.exceptions import ClientError
@@ -134,7 +134,7 @@ def test_state_machine_creation_fails_with_invalid_names():
     #
 
     for invalid_name in invalid_names:
-        with assert_raises(ClientError) as exc:
+        with assert_raises(ClientError):
             client.create_state_machine(
                 name=invalid_name,
                 definition=str(simple_definition),
@@ -147,7 +147,7 @@ def test_state_machine_creation_requires_valid_role_arn():
     client = boto3.client("stepfunctions", region_name=region)
     name = "example_step_function"
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         client.create_state_machine(
             name=name,
             definition=str(simple_definition),
@@ -242,7 +242,7 @@ def test_state_machine_creation_can_be_described():
 def test_state_machine_throws_error_when_describing_unknown_machine():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         unknown_state_machine = (
             "arn:aws:states:"
             + region
@@ -258,7 +258,7 @@ def test_state_machine_throws_error_when_describing_unknown_machine():
 def test_state_machine_throws_error_when_describing_bad_arn():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         client.describe_state_machine(stateMachineArn="bad")
 
 
@@ -267,7 +267,7 @@ def test_state_machine_throws_error_when_describing_bad_arn():
 def test_state_machine_throws_error_when_describing_machine_in_different_account():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         unknown_state_machine = (
             "arn:aws:states:" + region + ":000000000000:stateMachine:unknown"
         )
@@ -376,7 +376,7 @@ def test_state_machine_start_execution():
 def test_state_machine_start_execution_bad_arn_raises_exception():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         client.start_execution(stateMachineArn="bad")
 
 
@@ -464,7 +464,7 @@ def test_state_machine_list_executions_when_none_exist():
 
 @mock_stepfunctions
 @mock_sts
-def test_state_machine_describe_execution():
+def test_state_machine_describe_execution_with_no_input():
     client = boto3.client("stepfunctions", region_name=region)
     #
     sm = client.create_state_machine(
@@ -483,12 +483,36 @@ def test_state_machine_describe_execution():
     description.shouldnt.have("stopDate")
 
 
+@mock_stepfunctions
+@mock_sts
+def test_state_machine_describe_execution_with_custom_input():
+    client = boto3.client("stepfunctions", region_name=region)
+    #
+    execution_input = json.dumps({"input_key": "input_val"})
+    sm = client.create_state_machine(
+        name="name", definition=str(simple_definition), roleArn=_get_default_role()
+    )
+    execution = client.start_execution(
+        stateMachineArn=sm["stateMachineArn"], input=execution_input
+    )
+    description = client.describe_execution(executionArn=execution["executionArn"])
+    #
+    description["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
+    description["executionArn"].should.equal(execution["executionArn"])
+    description["input"].should.equal(execution_input)
+    description["name"].shouldnt.be.empty
+    description["startDate"].should.equal(execution["startDate"])
+    description["stateMachineArn"].should.equal(sm["stateMachineArn"])
+    description["status"].should.equal("RUNNING")
+    description.shouldnt.have("stopDate")
+
+
 @mock_stepfunctions
 @mock_sts
 def test_execution_throws_error_when_describing_unknown_execution():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         unknown_execution = (
             "arn:aws:states:" + region + ":" + _get_account_id() + ":execution:unknown"
         )
@@ -519,7 +543,7 @@ def test_state_machine_can_be_described_by_execution():
 def test_state_machine_throws_error_when_describing_unknown_execution():
     client = boto3.client("stepfunctions", region_name=region)
     #
-    with assert_raises(ClientError) as exc:
+    with assert_raises(ClientError):
         unknown_execution = (
             "arn:aws:states:" + region + ":" + _get_account_id() + ":execution:unknown"
         )