I have a DynamoDB table called Transactions
in which I am recording an audit trail of activity in my app. After midnight I would like to rename the table to something like Transactions.2015-10-01
and create a new table called Transactions
, to which I would record the next 24 hours of activity in my app. At the end of that period I would rename that to Transactions.2015-10-02
etc.
In other words, I'm trying to implement a rotating log of activity (though linear rather than circular).
I'm not sure there's a way to rename a table in DynamoDB. Is there a way? If not, is there another approach? For example, if there was a table pointer that was called Transactions
that would point to Transactions.2015-10-01
and then at midnight that pointer would switch to to Transactions.2015-10-02
. My app audit logic would simply perform insertions into Transactions
which delegates to the right table.