I have an environment where my DynamoDB table is central to a few services (a couple of lambdas, kinesis and firehoses). All of that is managed by AWS's CloudFormation/Typescript CDK.
This table has PITR enabled and, as far as I know, it's only possible to do a PITR by dumping the recovered data into a new table. Here is where the pain begins:
Thanks a lot community! :D
You must restore to a new table yes. There are some ways to overcome the issues you describe. Firstly, when you restore to a new table you will need to import that resource to your CDK stack.
Use the parameter Store to hold the latest name of your table, all of your down stream applications will resolve the table name by querying the param store.
Set your table name dynamically as environment variables for your lambda, this will reduce latency as opposed to the other approach, but it's only applicable to Lambda or services which allow you to set env variables.
AWS's documentation after the creation of the new table is INEXISTENT!
Please share feedback directly on the docs page if you believe relevant information is missing.
How can I update the references for the new table on all other services?
2 options mentioned above is the most common approach.
Should I just 'erase' my old table and import the recovered ones?
This would cause application downtime, if you can afford that then it would be an easy approach. If not, follow the above suggestions.
Wouldn't this means that I would need to take my service down to recover it? What is the "standard" or "best practice" here?
Yes, as mentioned above.