How to rename a DynamoDB table

I have DynamoDB table and I would like to rename it. There does not seems to be any commands or options to rename a table. Has anybody renamed a table before?


Solution 1:

I know this is an old question and I don't want to steal the thunder from user6500852's answer but for anyone stumbling upon this needing an answer:

  1. Select the table you want to rename in the Web UI so it's highlighted and the various tabs show up to the right.

  2. Click on the Backups tab and feast your eyes upon the lower half of the page ("On-Demand Backup and Restore").

Backup Area 3. Smash that "Create Backup" button. You'll be prompted for a backup name. Name it whatever you want. The world is yours!

  1. Give it time to complete the backup. If you just have a few records, this will be seconds. If you have a ton of records it could be hours. Buckle up or just go home and get some rest.

  2. Once the backup is ready, highlight it in the list. You'll see the "Restore Backup" button light up. Click it.

  3. You'll get a prompt asking you to enter the NEW table name. Enter the name you wanted to rename this table to. Note: the way the UI is you may have to click out of the field in the static page area for the "Restore table" button at the bottom of the page to light up. Restore Form

  4. Once you're ready to go, you click on the "Restore table" button. Note the info on that page indicating it can take several hours to complete. My table with just five test records took over 10 minutes to restore. I thought it was because the original was a Global Table but the restored table was NOT set up as a Global Table (which defeats the purpose of this for Global Tables since you have to empty the table to make it global).

Bear in mind that last note! If you're working with a Global Table, you will lose the Global part after the restore. Buyer beware! You may have to consider an export and import via Data Pipeline...

If you're not, then the Backup and Restore is a pretty easy process to use (without having to go and setup a pipeline, S3 store, etc.). It can just take some time.

Hope this helps someone!

Solution 2:

Currently no, you would need to create a new table and copy the data from one to the other if you really needed a new table name.