**Overview**

In AWS it is possible to trigger step functions through an API Gateway integration, see https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-api-gateway.html

Similar integrations already occur within localstack, however the step function URIs are notably missing. See lines 66-88 of https://github.com/localstack/localstack/blob/master/localstack/services/apigateway/apigateway_listener.py



┆Issue is synchronized with this [Jira Bug](https://localstack.atlassian.net/browse/LOC-107) by [Unito](https://www.unito.io/learn-more)

"""Simple class to mimick the behavior of variable '$util' in AWS API Gateway integration velocity templates.
    See: http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html"""
    def base64Encode(self, s):
        if not isinstance(s, str):
            s = json.dumps(s)
        encoded_str = s.encode(config.DEFAULT_ENCODING)
        encoded_b64_str = base64.b64encode(encoded_str)
        return encoded_b64_str.decode(config.DEFAULT_ENCODING)
    def base64Decode(self, s):
        if not isinstance(s, str):
            s = json.dumps(s)
        return base64.b64decode(s)
    def toJson(self, obj):
        return obj and json.dumps(obj)
    def urlEncode(self, s):
        return quote_plus(s)
    def urlDecode(self, s):
        return unquote_plus(s)
    def escapeJavaScript(self, s):
        return str(s).replace("'", r"\'")
def render_velocity_template(template, context, variables={}, as_json=False):
    import airspeed
    
    
    template = re.sub(r'(^|\n)#\s+set(.*)', r'\1#set\2', template, re.MULTILINE)
    
    empty_placeholder = ' __pLaCe-HoLdEr__ '
    template = re.sub(r'([^\s]+)#\$({)?(.*)', r'\1#%s$\2\3' % empty_placeholder, template, re.MULTILINE)
    
    class ExtendedString(str):