我创建了 CloudFormation 的 yaml 模板,现在我需要在 "AWS::ApiGateway::Method" 集成 Uri 中使用 !Sub
函数作为 !GetAtt "TestLambda.Arn"
的一部分:
Type: "AWS::ApiGateway::Method"
Properties:
RestApiId:
Ref: "RestApi"
ResourceId:
Ref: "TestResource"
HttpMethod: "GET"
AuthorizationType: "NONE"
Integration:
Type: "AWS_PROXY"
IntegrationHttpMethod: "POST"
Uri: !Sub "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/[[place where I want to use !GetAtt "TestLambda.Arn"]]/invocations"
因此,我希望得到类似于以下的值:
"arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/my-endpoint-lambda/invocations"
我该如何将这些函数结合起来,以获得所需的结果?
{ "Fn :: Sub":[ "www.${Domain}", { "Domain": {"Ref" : "RootDomainName" }} ]}
- Alex Barnes