Integration URI can be expressed in various shapes and forms. This method normalizes the Integration URI ARN
        and returns the Lambda Function ARN. Here are the different forms of Integration URI ARN:

        - String:
            - Fully resolved ARN
            - ARN with Stage Variables:
              Ex: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:123456789012:function:${stageVariables.PostFunctionName}/invocations  # NOQA

        - Dictionary: Usually contains intrinsic functions

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

            - Fn::Join: **Unsupported**. It is very hard to combine the joins into one string especially when
              certain properties are resolved only at runtime.

            - Ref, Fn::GetAtt: **Unsupported**. Impossible to use these intrinsics with integration URI. CFN doesn't
              support this functionality.

        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
        -------
        basestring or None
            Lambda Function ARN extracted from Integration URI. None, if it cannot get function Arn

def _get_function_arn(uri_data):
        """
        Integration URI can be expressed in various shapes and forms. This method normalizes the Integration URI ARN
        and returns the Lambda Function ARN. Here are the different forms of Integration URI ARN:

        - String:
            - Fully resolved ARN
            - ARN with Stage Variables:
              Ex: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:123456789012:function:${stageVariables.PostFunctionName}/invocations  # NOQA

        - Dictionary: Usually contains intrinsic functions

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

            - Fn::Join: **Unsupported**. It is very hard to combine the joins into one string especially when
              certain properties are resolved only at runtime.

            - Ref, Fn::GetAtt: **Unsupported**. Impossible to use these intrinsics with integration URI. CFN doesn't
              support this functionality.

        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
        -------
        basestring or None
            Lambda Function ARN extracted from Integration URI. None, if it cannot get function Arn
        """

        if not uri_data:
            return None

        if LambdaUri._is_sub_intrinsic(uri_data):
            uri_data = LambdaUri._resolve_fn_sub(uri_data)
            LOG.debug("Resolved Sub intrinsic function: %s", uri_data)

        # Even after processing intrinsics, this is not a string. Give up.
        if not isinstance(uri_data, string_types):
            LOG.debug("This Integration URI format is not supported: %s", uri_data)
            return None

        # uri_data is a string.
        # Let's check if it is actually a Lambda Integration URI and if so, extract the Function ARN
        matches = re.match(LambdaUri._REGEX_GET_FUNCTION_ARN, uri_data)
        if not matches or not matches.groups():
            LOG.debug("Ignoring Integration URI because it is not a Lambda Function integration: %s", uri_data)
            return None

        groups = matches.groups()
        return groups[0]