DEV Community

Akbar Ali Hussain
Akbar Ali Hussain

Posted on

DynamoDB as API

Image description
I developed a Terraform Module "DynamoDB-as-API" which will create a AWS REST-API to Read items from your DynamoDB tables (Create, Update, Delete will be added soon). You just provide the list of DynamoDB tables, this module will read schema of all tables and will generate endpoints accordingly.

eg. Below code will create an API with GET endpoints for books and authors for each Partition Key and Sort Key (if any). Since it read directly from DynamoDB without any Lambda, the response time will be lightning-fast...

module "dynamodb-as-api" {
  source  = "CloudPediaAI/dynamodb-as-api/aws"
  version = "1.0.0"

  api_name = "Library-API"
  domain_name = "city-library.com"

  dynamodb_tables = {
    "books" = {
      table_name         = "books-table"
      allowed_operations = "R"
    },
    "authors" = {
      table_name         = "authors-table"
      allowed_operations = "R"
    }
  }
  providers = {
    aws           = aws.provder_for_api
    aws.us-east-1 = aws.provder_for_ssl
  }
}
Enter fullscreen mode Exit fullscreen mode

Helpful Resources

Use it and please share your feedback which will help me to improve it.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more