0
0
DynamoDBquery~10 mins

On-demand backups in DynamoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an on-demand backup of a DynamoDB table.

DynamoDB
response = client.create_backup(TableName=[1], BackupName='MyBackup')
Drag options to blanks, or click blank then click option'
AMyTable
B'MyTable'
C'BackupTable'
DTableName
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the table name in quotes.
Using a variable name without quotes.
2fill in blank
medium

Complete the code to list all backups for a DynamoDB table.

DynamoDB
response = client.list_backups(TableName=[1])
Drag options to blanks, or click blank then click option'
A'MyTable'
BMyTable
C'BackupList'
DTableName
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the table name without quotes.
Using the wrong parameter name.
3fill in blank
hard

Fix the error in the code to delete a backup by its ARN.

DynamoDB
response = client.delete_backup(BackupArn=[1])
Drag options to blanks, or click blank then click option'
A'backup_arn_value'
Bbackup_arn
CbackupArn
D'backupArn_value'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the ARN without quotes.
Using incorrect parameter names.
4fill in blank
hard

Fill all three blanks to create a backup and print the backup ARN.

DynamoDB
response = client.create_backup(TableName=[1], BackupName=[2])
print(response['BackupDetails']['[3]'])
Drag options to blanks, or click blank then click option'
A'MyTable'
B'MyBackup'
CBackupArn
DBackupName
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes for table or backup names.
Using wrong key to access ARN.
5fill in blank
hard

Fill all three blanks to list backups filtered by table name and print the backup names.

DynamoDB
response = client.list_backups(TableName=[1])
for backup in response['Backups']:
    print(backup['[2]'])
    print(backup['[3]'])
Drag options to blanks, or click blank then click option'
A'MyTable'
BBackupName
CBackupArn
DTableName
Attempts:
3 left
💡 Hint
Common Mistakes
Not quoting the table name.
Using wrong keys to access backup details.