Build REST services on AWS

Building REST APIs that are secure, scalable and manageable is quite a challenging task. You can read my earlier blog to understand more about it. It might take weeks if not months to build an API that can support your mobile APP.  Your task doesn’t end here as your database also needs to be scalable to support increased traffic once your APP is viral.

Thanks to Amazon for providing wonderful services, building APIs with scalable architecture is no more a rocket science. All this can be handled very easily by selecting  two AWS offerings:

  • Dynamodb - fully managed, scalable NOSQL DB.
  • Amazon API Gateway - Fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.

APIs can be built in two easy steps:

  1. Create table in DynamoDB

By default DnamoDB always returns data in JSON format.  This solves half of challenge in delivering REST APIs on DB - convert data stored in tables to JSON object

2. Configure API Gateway to use DynamoDB

 This solves rest half by providing configurable options to control - throttling, authorization etc.

Table can be easily created using AWS management console(DynamoDB).  Configuring API gateway to consume data from DynamoDB is little tricky.  Sample configuration shown below should guide developers in this:

Set Method parameters as below

In “Integration Request” Set Mapping template to Dynamodb to map input parameters to Dynamodb Query

Map Dynamodb response to HTTP response in “Integration response“

Bingo!!  your Rest API is ready to support heavy traffic created by APP.

要查看或添加评论,请登录

Sudhir Jangam的更多文章

  • Beyond Imitation: Crafting Data Strategies That Suit Your Unique Business Needs

    Beyond Imitation: Crafting Data Strategies That Suit Your Unique Business Needs

    In the age of data-driven decision-making, many companies look to tech giants like Google, Amazon, and Facebook as the…

    4 条评论
  • Pitfalls In Enterprise ML Strategy

    Pitfalls In Enterprise ML Strategy

    Each BI strategy presentation talks about machine learning and actionable insights. It looks magical and exciting on…

    2 条评论
  • Cloud Strategy - Myths and Realities

    Cloud Strategy - Myths and Realities

    Cloud is one of the biggest buzzword for years. Now it’s on CEOs top agenda, technology and business teams are blindly…

  • Geovisualization on COVID19

    Geovisualization on COVID19

    In today’s world enterprises are processing lots of data. That data is of no use if it can’t provide any actionable…

  • Unnoticed Gem - HBASE

    Unnoticed Gem - HBASE

    Last decade of technology and data world was dominated by Hadoop and NoSQL. Organizations were racing to adopt these…

    2 条评论
  • Empowering machine learning architecture using D3Js.

    Empowering machine learning architecture using D3Js.

    We all know a saying “A picture is worth a thousand words”. This statement has never been more accurate than in…

  • REST APIs on AWS

    REST APIs on AWS

    I started this as a small project to build a RESTful API to serve data in RDBMS. Aim was to build RESTful API on AWS…

    5 条评论
  • Artificial Intelligence

    Artificial Intelligence

    With evolution of computing systems and reduction in hardware cost theories and concepts are getting into reality…

    3 条评论

社区洞察

其他会员也浏览了