title: How to use Sub and GetAtt functions at the same time in CloudFormation template?
body: <p>I created CloudFormation yaml template and I need to use <code>!GetAtt &quot;TestLambda.Arn&quot;</code> as part of <code>!Sub</code> function in &quot;AWS::ApiGateway::Method&quot; Integration Uri:</p>
  <pre class="lang-yaml prettyprint-override"><code>Type: &quot;AWS::ApiGateway::Method&quot;
    Properties:
      RestApiId:
        Ref: &quot;RestApi&quot;
      ResourceId:
        Ref: &quot;TestResource&quot;
      HttpMethod: &quot;GET&quot;
      AuthorizationType: &quot;NONE&quot;
      Integration:
        Type: &quot;AWS_PROXY&quot;
        IntegrationHttpMethod: &quot;POST&quot;
        Uri: !Sub &quot;arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/[[place where I want to use !GetAtt &quot;TestLambda.Arn&quot;]]/invocations&quot;
  </code></pre>
  <p>As result I want to get a value something like that:</p>
  <pre><code>&quot;arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/my-endpoint-lambda/invocations&quot;
  </code></pre>
  <p>How can I use these functions together and get the desired result?</p>