I’m new to serverless. I’ve managed to set up my API, but I’m seeing something that makes me think I’ve done something wrong. Maybe this is how serverless manages my infrastructure, I’d just like to make sure this is expected.
I have an API with four services [users, accounts, subscriptions, products]. I also have three stages [dev, stage, prod].
I am setting 12 API gateways, 12 cloud formations, 12 s3 buckets.
Basically one for each service and each stage. i.e. api-users-dev, api-users-prod, api-accounts-dev, api-accounts-prod, etc…
Is this expected? I can see this growing really big. Let’s say I ended up with 20 services then I’ll each 60 api gateways, cloudformations, s3 buckets.
Since you can define multiple stages in API gateway, why need one for each service/stage?
I can see having to do this in order to be able to manage each service/stage independently since lamba and cloudformation do not support stages…
Ok, so is this expected so I can have peace of mind? Or did I create my API incorrectly and I need to change it?
Thanks in advance.