Skip to content

jmstout/dynamodb-backup-scheduler

Repository files navigation

Unito DynamoDB Backup Scheduler

This modules creates a Lambda function to create on-demand DynamoDB backups. It also creates a CloudWatch scheduled event to trigger the Lambda function daily. The Lambda also makes sure to delete old backups.

Installation

npm install -g serverless
npm install

Configuration

Copy the file env-example.yml to env.yml and edit its content.

AWS Credentials

Set up your AWS Credentials. Follow these instructions. Easiest is to use AWS profiles. You can create a profile with the command:

$ aws configure --profile newAccount

and then use it by exporting:

export AWS_PROFILE=newAccount

or prefixing every serverless command with

AWS_PROFILE=newAccount serverless ...

IAM Permissions

The IAM identity used to deploy requires several permissions. Start by creating an IAM policy based on the content of this file. You will need to replace with the name of the AWS region and with your actual AWS account number.

Once you have added that policy, attach it to your user account (or to a group your user is part of).

Initial Deployment

serverless deploy -v

Updating the Lambda function only

serverless deploy function -f backupDynamoDBTables

Deleting

serverless remove -v

About

Trigger DynamoDB on-demand backups through CloudWatch events using serverless

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published