Integration without Lambda
Understand the importance of integrating with services other than the Lambda function.
We'll cover the following
Code without code
Lambda functions revolutionized computing, leading the world to a new serverless computing paradigm. Over the years, we’ve seen several enterprise-scale applications grow out of the servers to a fully serverless architecture. We can use the Lambda function for almost everything, but we have a long way to go. A true serverless architecture minimizes the use of Lambda.
There’s ample power in the multitude of services in the AWS serverless range that can do most of the common tasks for us. We can get extreme performance and savings if we deploy them correctly. We can restrict the Lambda functions for implementing specific complex logic.
This chapter focuses on creating applications with reduced involvement of Lambda functions. One of the important components of such architectures is the API Gateway integration with AWS services.
Paradigm inversion
If we think about it, this is a holdover from the monolith mindset, where we had one block of code doing all the work. Even after we break the block into pieces, we still want to retain that control in the central code block, which we push into the Lambda function.
The right way to a serverless microservice architecture is to delegate the responsibilities. AWS is packed with services that already do what we need. Instead of reinventing the wheel, it’s efficient and effective if we can leverage those services directly.
This requires an inversion of the paradigm. Instead of having our Lambda function code in the center, invoking specific services where needed, we should have the AWS services in the center, invoking custom Lambda functions only for particular requirements. If we can do it, we can build great applications with extreme performance and scalability at a meager cost.
Integrating with services
The most intuitive and commonly used integration pattern in AWS is integrating a Lambda function that invokes specific web services. We find this simpler because we’re comfortable with code more than configuration. However, this adds to the latency and cost.
The better way is to connect the service directly to the API Gateway and invoke the Lambda function for specific processing in the case that it is required.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy