In this section, we will check whether the functions work properly.
To test the functions, click documentData.json below to download the file directly to your computer:
Run the following command to write data to the table:
You have completed creating Lambda functions that interact with DynamoDB. In the next workshop, we will implement authentication and storage with the Amplify library.aws dynamodb batch-write-item --request-items file://documentData.json and the data in the Documents table will be displayed as shown below.
Test listing function
tc_1 as the event name{
"pathParameters": {
"id": "abcd1234"
}
}


Test adding function
tc_1 as the event name{
"body": {
"user_id": "abcd1234",
"file": "aws_serverless.doc",
"folder": "",
"identityId": "123456cvbn",
"modified": "13-03-2023",
"size": "2MB",
"type": "doc",
"tag": "aws, serverless"
}
}



Test deleting function
tc_1 as the event name{
"pathParameters": {
"id": "abcd1234"
},
"queryStringParameters": {
"file": "aws-exports.js"
}
}


