Is there a way to export DynamoDB backup (on demand) to s3 without enabling PITR?

Viewed 240

I want to know if it is possible to take a backup created on demand to s3 as well as the "export_table_to_point_in_time" functionality of boto without having the PITR activated.

The scenario is to create a daily backup and store it for 7 days in Dynamo, after 7 days take it to S3, to have a recovery window of only 7 days. The bucket is used only for auditing purposes.

I aprecciate your collaboration!

1 Answers

There are, but you will have to do much of the work yourself.

I would enable TTL in DynamoDB along with DynamoDB's change data capture to filter these items out, as they are deleted from the table in a specific way. Consuming the stream would be an AWS Lambda function that would take these items and write them to S3 like you are looking for. Make sure to use Lambdas newish "event source filter" feature to filter for TTL delete and only fire the Lambda then. That will save you Lambda function invocations and thus possibly save you money.

Related