Wipe your tears off. In half an hour, with a few steps, your REST API can be built on the AWS with the DynamoDB and the AWS API Gateway filtering the methods for the proper Lambda function.
Just create your Lambdas, copy these method codes in the index.js files, paste them on your Lambdas' index.js files, and change the table name to fit your DynamoDB table name.