Open In App

AWS DynamoDB – Working with Backups

Amazon DynamoDB supports on-demand backup and restores features. Those features are available to the user independent of whether the user uses AWS Backup or not. Users can use the DynamoDB on-demand backup capability to create full backups of its tables for a long-term period and archival for regulatory observation needs. 

DynamoDB also removes the complexity of the operation involved in protecting sensitive data. While using DynamoDB, users don’t have to worry about cluster scaling, managing nodes, reputation, hardware supervising, etc.



Point-in-time recovery (PITR) provides continuous backups of the user’s DynamoDB table data. When enabled, DynamoDB maintains incremental backups of the user table for the last 35 days until the user intentionally turns it off.

Features of DynamoDB:

Following are the features of DynamoDB:



Advantages of DynamoDB:

Following are the advantages of using DynamoDB:

Point-in-Time Recovery for DynamoDB:

Point-in-Time Recovery for DynamoDB makes sure to protect your vital data in form of tables from any kind of read and delete functioning. Users don’t need to worry about all the other operations. Restore can be done at a point in time. 

Backing Up a DynamoDB Table:

Follow the below steps to backup a DynamoDB table:

Output:

{
"BackupDetails": {
    "BackupName":
    "WebSeriesBackup",
    "BackupArn": "arn:aws:dynamodb:us-east-1:123456789012: table/WebSeries/backup/1456781290135-73d8d5bc,
    "BackupStatus": "CREATING",
    "BackupCreationDateTime": 1456781290.135
    }
}

Restoring a DynamoDB Table from a Backup: 

Follow the below steps to restore a dynamo DB table from backup:

Output:

aws dynamodb restore-table-from-backup \
--target-table-name WebSeries\
--backup-arn arn:aws: dynamodb:us-east-1:123456789012: table/Music/backup/01581881483719-db9c1f91
--global-secondary-index-override '[]' \
--sse-specification-override Enabled=true, SSEType=KMS

Deleting a DynamoDB Table Backup: 

Follow the below steps to delete a DynamoDB table backup:

Output:

aws dynamodb delete-backup \
--backup-arn arn:aws: dynamodb:us-east-1:123456789012: table/Music/backup/01489602797149-73d8d5bc

Using IAM with DynamoDB Backup and Restore:

Users can easily use AWS Identity and Access Management (IAM) only when the data which need to be backup are in the same AWS account.

Example 1: Permit the “CreateBackup” and “RestoreTableFromBackup”:- Grant the access in both actions.

{
    "Version": "2022-02-23",
    "Statement": [
        {
        "Effect": "Allow",
        "Action": [
            "dynamodb: CreateBackup",
            "dynamodb: Restore Table FromBackup",
            "dynamodb: PutItem",
            "dynamodb:UpdateItem",
            "dynamodb: DeleteItem",
            "dynamodb: GetItem",
            "dynamodb:Query",
            "dynamodb: Scan",
            "dynamodb: BatchWriteItem"
            ],            
        "Resource": "arn:aws:dynamodb:us-east-1:123456789012: table/WebSeries"
        }
    ]
}
Article Tags :