DEV Community

Discussion on: Serverless is just for image processing or can I use to build my API

Collapse
 
adnanrahic profile image
Adnan Rahić • Edited

You can use AWS services to create REST APIs. The only issue is that you can't do this with Lambdas alone. You need a whole set of services to create a REST API. The Lambdas are only the compute layer of the API. It's the Docker container that runs your code.

What you also need it the REST API endpoints to bind as event triggers for your Lambdas. For this, you use AWS API Gateway. Once you have an en endpoint you use it to trigger the Lambda.

But wait. You need a DB. For this, you use either DynamoDB which is AWS' offering for NoSQL pay-as-you-go storage, or a DB as a service like mLab or MongoDB Atlas. DynamoDB is basically just like Mongo, but you pay for it in a similar way as with Lambda. Only pay for what you use.

Then, you need an authentication/authorization method. For that, you can use Auth0 or another AWS service called Cognito.

It's more than doable to create full-fledged applications and REST APIs by using Serverless Architecture. Just by using Lambda, you can't do anything, because the Lambda is just a function waiting to get triggered by an external event.

Hope I made sense. :D

You can read more about this here.