DEV Community

Cover image for Mobile app with a serverless backend
Rashwan Lazkani
Rashwan Lazkani

Posted on

Mobile app with a serverless backend

So you have you mobile application and do now realize that you need a backend service but you don't want to host any servers. How can you achieve this?

In this article I will show you how you easily with AWS can make use of several tools to handle this and without handling any servers (serverless).

Our architecture would looks something like this:

Image description

Let's go through each part below.

1. Amazon Cognito

We'll use Amazon Cognito for the login which will return User Pool tokens (note: with Amazon Cognito you can also use Amazon Cognito federates third party identity such as Facebook and Google).

2. Amazon API Gateway

With HTTPS request and the included Amazon Cognito tokens we'll make use of Amazon API Gateway to call the appropriate endpoint

3. AWS Lambda

Amazon API Gateway sends HTTPS requests to the appropriate Lambda based on the requested resource

4. Amazon DynamoDB

We'll use Amazon DynamoDB as a NoSQL database which our Lambdas will use to post/retrieve data

For this application we have used three different tiers.

  1. Presentation - mobile application
  2. Logic - Amazon API Gateway with AWS Lambda
  3. Data - DynamoDB

Summary

That's it! A short summary of how you can use a serverless backend to your mobile applications.

Any comments, questions or discussions are always welcome!

Top comments (0)