Open DynamoDB console, then Click Create table
Enter table name: Books
Scroll down to Table settings pattern, select Customize settings
Enter sort key: name
Scroll down to the bottom, click Create table
So we have created the Books table with the Local secondary index of name-index
To add data to the table, you can download the file below:
Open this file, replace all <AWS-REGION>
with the region where you created the S3 book-image-resize-shop bucket, for example: ap-southeast-2
Run the following command in the directory where you save the dynamoDB.json
aws dynamodb batch-write-item --request-items file://dynamoDB.json