I ended up figuring it out thanks to some people over on reddit. You just need to add
"ContainerOverrides": {
"Environment": [
{
"Name": "var1",
"Value": "{% $states.input.value1 %}"
},
{
"Name": "var2",
"Value": "{% $states.input.value2 %}"
}
]
}
to whichever container you are trying to get the variables into on the State Machine/Step Function definition, under the Arguments field.