The general way to export or make a backup of data from DynamoDB is to use data pipeline.
If you want a simple way of extracting the contents of your table to a file at a predetermined rate then this is the gem for you.
The contents of the table is exported to file with each line representing a row in the table.
Add this line to your application's Gemfile:
gem 'heckscher'
And then execute:
$ bundle
Or install it yourself as:
$ gem install heckscher
You need to make sure that your credentials are set in the ENV variables before running the app:
AWS_ACCESS_KEY_ID='bob'
AWS_SECRET_ACCESS_KEY='bob'
AWS_REGION='eu-west-1'
Currently there's only one command, and as it's a thor app you can use the help method to find out the parameters needed:
heckscher help
- Fork it ( https://github.com/stevenjack/heckscher/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request