AWS, Cloud

One key reason why AWS is the leading cloud vendor today is that its services are deeply integrated with each other. To get the most out of your investment in AWS, you need to leverage these integrations. When you do this right, the possibilities are endless.

To demonstrate the level of agility and power you can achieve by integrating AWS services, let’s look at two particularly powerful AWS services—AWS API Gateway and AWS Lambda.

What Are API Gateway and AWS Lambda?

The AWS API Gateway acts as a bridge between your AWS services and external apps. It authenticates, manages, and monitors API calls from external apps and passes them to AWS services like EC2, DynamoDB—or as we’re going to discuss in this post, AWS Lambda.

AWS Lambda is a serverless computing platform that executes any code you upload to it as functions. This means you don’t need to maintain any servers, or manage things like CPU, memory, and networking. It’s all managed for you by AWS. All you need to do is upload your code and run it.

Both these services from AWS are powerful on their own. API Gateway takes the pain out of API management, and Lambda makes managing infrastructure a thing of the past. But when used together, you begin to extract the full potential of these services. Here’s an architecture diagram of what it would look like when API Gateway and Lambda work together:

API calls are made from various external apps; they are processed by API Gateway, and are routed to Lambda for processing. Lambda may use other AWS services to complete a request, and, once complete, it sends back the response to the external app via API gateway.

But what are the benefits of this integration? Well, there are many, as we’ll see below.

1. Release New Features Faster

The success of your organization depends on delivering new features and capabilities for your applications. The company that brings the most innovative features to market faster will eventually win. However, many organizations spend way too much time managing their infrastructure—configuring servers, installing packages, creating APIs, ensuring they’re up-to-date, and on and on. An integration between Lambda and API Gateway turns your infrastructure into a plug-and-play platform.

All you need is your code, and the system is ready to run it for you, and even let external apps leverage the same code without any additional setup.

The speed this enables you to build more features faster, and ship them out without hassle.

2. Stay Secure at Scale

When moving at speed, security is a crucial concern. To be secure while still moving fast, you need security that scales. API Gateway has a robust set of policies and defaults for authorization and load balancing so that API calls don’t infect or overload your system. It lets you define whether you’d like an open endpoint between your external apps and Lambda, or one controlled by an IAM policy.

You can use a Lambda function as a custom authorizer for OAuth or JWT keys. When API Gateway gets an API call with an OAuth token, it sends the token to Lambda which verifies the token according to an IAM policy. In this way, you can secure your API interactions at scale without having to configure it all from the ground up. And because AWS manages high availability for the security service, you can be sure that your security policies will not be affected by outages and infrastructure failures.

3. Supercharge Enterprise Applications

Legacy enterprise applications like ERP, CRM, and HRMS systems are heavily dependent on integrations. However, each integration typically takes weeks or months to set up, and requires expert consultants to maintain. Now, with the help of API Gateway and Lambda, you can create an integration between an enterprise app and a cloud app in AWS in minutes.

This is powerful if you want to bring your legacy apps up to speed without completely disregarding your investment in them over the years (read more about what legacy systems are and what you should do with them). Think about unlocking all that data that’s stuck in your Sharepoint farms and what you could do if you could make it accessible to your AWS applications—or provide your sales teams with real-time insight into how their clients interact with your applications in AWS. All this and more is possible using API Gateway and Lambda as a bridge between your enterprise apps and your AWS services.

4. Decouple the Frontend from the Backend

With an API, you can make your applications and data available to third-party apps and developers who can in turn use it to serve customers in unique ways. However, API management is a tedious process. Building custom integrations for backend apps, handling versioning of the API, and monitoring API calls all take time away from enabling frontend apps, which is ideally what you want to be doing. By offloading the maintenance to API Gateway, and extending API functionality with Lambda, you can focus on enabling new services at the frontend.

Whether new mobile apps, vendor applications, or a better user experience with your own product, integrating API Gateway with Lambda opens up a lot of possibilities. It even shows you a monitoring dashboard with the number of API calls, latency of calls, and errors, including error type. So, though you don’t maintain your API infrastructure, you’re always informed of its performance and status.

A Match Made in Heaven

APIs are the language applications use to talk with each other. Bad API management can be the bane of any organization. However, by leveraging the API management features of AWS API Gateway, and bolstering them with the processing power of AWS Lambda, you can bring digital transformation to your organisation with little effort. Because of the limitless possibilities they enable, API Gateway and Lambda are a match made in heaven.

  • Benjamin Wootton

    Co-Founder and CTO

    Benjamin Wootton is the Co-Founder and CTO, EMEA of Contino. He has worked with tens of enterprise organisations on DevOps transformation and is a hands-on DevOps engineer with expertise in cloud and containers.

    More Articles by Benjamin