@staticmethod<EOL><INDENT>def _resolve_fn_sub(uri_data):<DEDENT>
<EOL>arn = uri_data[LambdaUri._FN_SUB]<EOL>if isinstance(arn, list):<EOL><INDENT>arn = arn[<NUM_LIT:0>]<EOL><DEDENT>if not isinstance(arn, string_types):<EOL><INDENT>LOG.debug("<STR_LIT>", uri_data)<EOL>return uri_data<EOL><DEDENT>lambda_function_arn_template = r'<STR_LIT>'<EOL>return re.sub(LambdaUri._REGEX_SUB_FUNCTION_ARN,  <EOL>lambda_function_arn_template,<EOL>arn)<EOL>
Tries to resolve an Integration URI which contains Fn::Sub intrinsic function. This method tries to resolve
and produce a string output.

Example:
{
  "Fn::Sub":
    "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunction.Arn}/invocations"
}

Fn::Sub Processing:
~~~~~~~~~~~~~~~~~~

If this is a Fn::Sub, resolve as following:
    1. Get the ARN String:
        - If Sub is using the array syntax, then use element which is a string.
        - If Sub is using string syntax, then just use the string.
    2. If there is a ${XXX.Arn} then replace it with a dummy ARN
    3. Otherwise skip it

.. code:
    Input:
    {
      "Fn::Sub":
        "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunction.Arn}/invocations"
    }

    Output: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:LambdaFunction/invocations"  # NOQA

Note
~~~~
This method supports only a very restricted subset of intrinsic functions with Swagger document. This is the
best we can do without implementing a full blown intrinsic function resolution module.

Parameters
----------
uri_data : string or dict
    Value of Integration URI. It can either be a string or an intrinsic function that resolves to a string

Returns
-------
string
    Integration URI as a string, if we were able to resolve the Sub intrinsic
dict
    Input data is returned unmodified if we are unable to resolve the intrinsic