Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating RESTful services in AWS Lambda

As I gone over the AWS Lambda documentation, there are references on triggering services based on AWS events. I do not see references on hosting services in Lambda.

Would like to understand whether is it possible to create RESTful services using AWS Lambda for web sites to consume or not?

I can use NodeJs to develop the service.

like image 775
Anbu Avatar asked Feb 19 '15 06:02

Anbu


People also ask

Can Lambda call REST API?

Like this, we can call any REST API in our Lambda Function and perform any serverless operations on the response.


1 Answers

Correction :

Amazon has launched - Amazon API Gateway which used Lambda

What Is Amazon API Gateway?

API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to business logic hosted on AWS Lambda, APIs hosted on Amazon EC2, or other publicly addressable web services hosted inside or outside of AWS. With API Gateway, developers can create and operate APIs for their back-end services without developing and maintaining infrastructure to handle authorization and access control, traffic management, monitoring and analytics, version management, and software development kit (SDK) generation.

API Gateway is designed for web and mobile developers who are looking to provide secure, reliable access to back-end APIs for access from mobile apps, web apps, and server apps that are built internally or by third-party ecosystem partners. The business logic behind the APIs can either be provided by a publicly accessible endpoint API Gateway proxies call to, or it can be entirely run as a Lambda function.

https://aws.amazon.com/api-gateway

As of today; AWS Lambda is focused on working out / responding to events like S3 put, DynamoDB Streams and also custom events [ there could be more event sources expected from Amazon ] - with heavily leveraging the STATELESSNESS style of programming.

To build out a complete RESTful Service backend using AWS Lambda wouldn't be possible or in other words AWS Lambda would be a bad choice to build the RESTful Service. You can continue to use the NodeJS and make it run on top of EC2 or ElasticBeanstalk.

like image 181
Naveen Vijay Avatar answered Sep 20 '22 18:09

Naveen Vijay