AWS Step function use input value to make complete command

The .$ tells step-functions that you are passing a path and not a literal string value.

Input/Ouput Path Params Doc

If you want to construct a string from inputs, you should be able to use intrinsic string formatting:

States.Format('python test.py --name={} --age={}', $.name, $.age)

Intrinsic Function Doc

{
    "Comment": "A description of my state machine",
    "StartAt": "Run Pipeline",
    "States": {
        "Run Pipeline": {
            "Type": "Task",
            "Resource": "arn:aws:states:::ecs:runTask.sync",
            "Parameters": {
                "LaunchType": "FARGATE",
                "Cluster": "aaaaaaaaaaaaaa",
                "TaskDefinition": "aaaaaaaaaaaaaa",
                "Overrides": {
                    "ContainerOverrides": [{
                        "Name": "my_container",
                        "Command.$": "States.Array(States.Format('python test.py --name={} --age={}', $.name, $.age))"
                    }]
                }
            },
            "End": true
        }
    }
}

States.Array makes an array out of a list of inputs.

States.Format lets you construct a string using literal and interpolated (variable) inputs.