I am working on a serverless framework(cloud formation), I have created two stacks in the same AWS region, and each serverless.yml(stack1, stack2) having their own APIs. How can I get the stack-1(yml) API URL in stack-2 yml.
Stack-1(serverless1.yml)
functions:
tGateWay:
handler: src/handlers/tGateWay.handler
name: ${self:provider.stage}-tGateWay
environment:
first: ${self:provider.stage}-firstlambda
events:
- http:
method: any
path: /tGateway
private: true
Stack-2(serverless2.yml)
functions:
tModule:
handler: src/handlers/tModule.handler
name: ${self:provider.stage}-tModule
environment:
find: ${self:provider.stage}-find
T_GATEWAY: https://xxxxxxxxx.execute-api.xxxxxxx-1.amazonaws.com/dev/tGateway
In that T_GATEWAY I want to access stack-1 API gateway URL
Thanks in advance!