I'm building a production level serverless application and I'm debating if I should put DynamoDb tables in CloudFormation or not. We are also using Aurora PostgreSQL and I read it is not recommended to use CloudFormation for that or if you do, then you need to use a completely different stack (not nested stack).
Currently our CloudFormation stack looks like this: Main Stack (builds Lambdas, ApiGateway) -> [Nested stack] Networking (VPCs, subnets, etc) based on environment
In your experience, what is recommended for CloudFormation and DynamoDb tables:
Looking for a design that will last and not require migrations or rebuilding tables.
Cloudformation can retain the table and tables data under any change. You can import the data to subsequent stacks of you wish.
Many users like to decouple their data layer from the application layer as the application layer typically changes more frequent, but this approach is a personal choice, it's not required.
So my educated recommendation is to use cloudformation to manage the table for sure, but it's totally dependent on you how you implement the specific stack.