Robert
05/17/2022, 8:17 PMAPI
and I just addRoutes
to it whenever I need to, but I see my resources going up pretty fast in the CloudFormation stack and I know that I'll eventually hit the 500 resources limit. Do you guys have more than one API? And if so, do you just use the same customDomain
with different path
?Adam Fanello
05/17/2022, 8:22 PMRobert
05/17/2022, 8:25 PMthdxr
05/17/2022, 8:32 PMthdxr
05/17/2022, 8:32 PMRobert
05/17/2022, 8:32 PMRobert
05/17/2022, 8:32 PMRobert
05/17/2022, 8:33 PMthdxr
05/17/2022, 8:33 PMthdxr
05/17/2022, 8:33 PMRobert
05/17/2022, 8:33 PMRobert
05/17/2022, 8:35 PMAdam Fanello
05/17/2022, 8:35 PMRobert
05/17/2022, 8:36 PMAdam Fanello
05/17/2022, 8:38 PMRobert
05/17/2022, 8:39 PMuse()
it and addRoutes on it.
Right now I have 46 routes, and I am up to 264 resources in the CloudFormation stack 😕Tim
05/17/2022, 10:28 PMTim
05/17/2022, 10:29 PMDrew
05/17/2022, 10:30 PMDrew
05/17/2022, 10:31 PMDrew
05/17/2022, 10:31 PMFrank
Api
in stackA, and in stackB you use
it and call addRoutes
, the resources for the routes are created in the stackB’s CloudFormation template.Frank
Robert
05/18/2022, 9:43 AMapiGateway
with default stuff, like timeout, cors, some permissions, etc.
Then in every other stack, let's say my Users stack, I add routes to the apiGateway. Something like
apiGateway.addRoutes(ctx.stack, {
'GET /users': {
function: {
functionName: `${id}-${ctx.app.stage}-get-users`,
handler: 'handlers/user.get',
},
},
});
When I do this it creates a stack in CloudFormation for the apiGateway
, and a stack for the users
. But in both of them resources are added.
After that, in every stack where I use my apiGateway to addRoutes in it, it will create a new CloudFormation stack, but it will also add resources to the apiGateway's CloudFormation stack.
Only thing I can think of, could it be because I am using the ApiGatewayV1Api
object?