I'm trying to build a CFT that creates a Lambda Function and an API, and integrates both of them. I'm currently able to create the Lambda Function and the API, but I can't integrate them.
I thought of using AWS:Lambda:Permission, or specifying the Lambda Function in the AWS:RestApi resource, but both require either ARN value of the Lambda Function or the API ID- Both of which I don't have access to because I'm trying to create, deploy, and integrate Lambda and API Gateway in a SINGLE CFT.
What method or resource should I specify in my CFT that can integrate my lambda function and API Gateway, without needing the Lambda ARN or API Id, since I don't have access to those until after theyre created?
EDIT: If it helps, I'm also using Swagger in my CFT