We are developing a serverless application (AWS API Gateway, Lambda, and Dynamo) keeping users and groups in the same microservice as they are being stored in the same DynamoDB table.
Is it okay to have endpoints with different "base" in the same microservice?
From the perspective of REST: yes, of course. An important idea in REST is that we have a common understanding of the semantics of our self descriptive messages, but we have freedom in how we handle those messages.
So REST isn't going to care if the representations of those resources are generated by a single function, or by multiple functions. And REST isn't going to care, in the case of multiple functions, whether they are released together or separately, whether they are implemented by the same team or different teams, and so on.
Clearly the implementations of your resources have some coupling, because they are sharing the same Dynamodb table, so your current design cannot handle schema changes that contradict each other. Any change to your stored schema that requires a backwards breaking change will necessarily require coordinating the release of changes for both resources.
But there's no particular reason that all of your request handlers need to be implemented using the same lambda runtime.
What you've really got are a number of trade offs, and the best choices to make are going to depend on local circumstances (which may be changing over time).
But absolutely: one of the possibilities is that all of the resources under
/user and all of the resources under
/group belong in the same "microservice".