Microservices and sharing of the resources

Hi I have a path in Yml file as

path: alerts/{alertName}/{printerid}/subscribe.

I get the error when deploying as A sibling ({printerid}) of this resource already has a variable path part – only one is allowed

Does this mean I can have a maximum one path parameter? How can i supply multiple parameters to Lambda.

Also I would like to create more than one micro services and deploy them separately where each service wil contain multiple Lambda.

You may have multiple pathParameters, But not different ones at the same nesting level.

/path/to/{param1}/data    <= ok
/path/to/{param1}/data/{param2}/stuff    <= ok
/path/to/{param3}/data    <= bad.. conflicts with param1 at same level in URI path
/path/to/{param1}/other/{param1}/stuff    <= bad.. can't have same pathParam in 2 places.

Hope that helps.

Thank you for your reply. I have question though -


This 2 paths have different starting point. Is this allowed?

Also if I create 2 seperate services, and each service having one of the above path, then will it be allowed?

Yes. This won’t be a problem.

Independently, I they would be fine, but I imagine that you would have issues trying to deploy the 2nd stack as API Gateway would flag problems resolving the conflict.