You don't need to use !GetAtt
here, !Sub
will automatically unpack values for you if you place them within the place holder:
Uri: !Sub arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/${TestLambda.Arn}/invocations
This is explained in the docs:
If you specify template parameter names or resource logical IDs, such as ${InstanceTypeParameter}
, AWS CloudFormation returns the same values as if you used the Ref intrinsic function. If you specify resource attributes, such as ${MyInstance.PublicIp}
, AWS CloudFormation returns the same values as if you used the Fn::GetAtt
intrinsic function.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…