Complete the code to specify the S3 bucket name for the import task.
import_task = {
'S3BucketSource': {
'S3Bucket': '[1]'
}
}The S3Bucket key must contain the exact name of the S3 bucket where the data is stored. Here, dynamodb-import-bucket is the correct bucket name.
Complete the code to specify the S3 key (file path) for the import task.
import_task = {
'S3BucketSource': {
'S3Bucket': 'dynamodb-import-bucket',
'S3Key': '[1]'
}
}The S3Key specifies the path to the file inside the bucket. Here, import/data.json is the correct path for the import file.
Fix the error in the import task by completing the code with the correct import format.
import_task = {
'S3BucketSource': {
'S3Bucket': 'dynamodb-import-bucket',
'S3Key': 'import/data.json'
},
'InputFormat': '[1]'
}The InputFormat must match the format of the data file. Since the file is data.json, the format is JSON.
Fill both blanks to complete the import task with the correct table name and import mode.
import_task = {
'TableName': '[1]',
'ImportMode': '[2]',
'S3BucketSource': {
'S3Bucket': 'dynamodb-import-bucket',
'S3Key': 'import/data.json'
},
'InputFormat': 'JSON'
}The TableName is the DynamoDB table to import into, here UsersTable. The ImportMode defines how data is imported; Append adds data without deleting existing items.
Fill all three blanks to complete the import task with table name, import mode, and S3 key.
import_task = {
'TableName': '[1]',
'ImportMode': '[2]',
'S3BucketSource': {
'S3Bucket': 'dynamodb-import-bucket',
'S3Key': '[3]'
},
'InputFormat': 'JSON'
}The TableName is OrdersTable for order data. The ImportMode is Append to add data. The S3Key is the file path orders/2024.json inside the bucket.