Free Ebook cover Python course with Lambda and API Gateway for backend development

Python course with Lambda and API Gateway for backend development

5

(1)

142 pages

Developing GraphQL APIs with API Gateway and Lambda: AWS Lambda Basics

Capítulo 121

Estimated reading time: 3 minutes

Audio Icon

Listen in audio

0:00 / 0:00

AWS Lambda is a compute service that lets you run code without provisioning or managing servers. It runs your code only when needed and automatically scales from a few requests per day to thousands per second. You only pay for the computing time consumed, there is no charge when your code is not running.

With AWS Lambda, you can run code for virtually any type of application or back-end service, without the need for administration. Simply upload your code and Lambda takes care of everything needed to run and scale your code with high availability. You can configure your code to trigger automatically from other AWS services, or call it directly from any web application or mobile device.

How does AWS Lambda work?

AWS Lambda runs your code on a highly available computing infrastructure and manages all computing resources, including server and operating system maintenance, capacity provisioning and autoscaling, application monitoring, and logging. All you have to do is provide the code.

Development of GraphQL APIs with API Gateway and Lambda

One of the main applications of AWS Lambda is the development of GraphQL APIs with API Gateway. GraphQL is a query language for APIs and a runtime for running those queries against your existing data. GraphQL provides a complete and understandable description of the data in your API, gives customers the power to request exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

API Gateway is a fully managed service that makes it easy to develop, deploy, and maintain APIs at scale. With API Gateway, you can process hundreds of thousands of simultaneous requests to your APIs and data is transferred between the Internet and your backend applications securely and efficiently.

Continue in our app.

You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.

Or continue reading below...
Download App

Download the app

Integrating AWS Lambda, API Gateway and GraphQL

With AWS Lambda and API Gateway, you can create a serverless GraphQL API. You can use AWS Lambda to run the GraphQL server and API Gateway to trigger the Lambda function whenever an HTTP request is sent. AWS Lambda executes the function code, which can access other AWS services, and returns the response to the client.

To create a GraphQL API with AWS Lambda and API Gateway, you need to follow the following steps:

  1. Create a Lambda function that will run your GraphQL code.
  2. Configure API Gateway to trigger the Lambda function whenever an HTTP request is sent.
  3. Test the GraphQL API by sending HTTP requests and verifying the responses.

In conclusion, the combination of AWS Lambda and API Gateway provides a powerful and flexible way to build GraphQL APIs. You can focus on writing your GraphQL code, while AWS takes care of server provisioning and management, autoscaling, monitoring, and logging.

Now answer the exercise about the content:

What is AWS Lambda and what are its main features?

You are right! Congratulations, now go to the next page

You missed! Try again.

The correct option is 2. AWS Lambda is a compute service that lets you run code without provisioning or managing servers. It automatically scales and you only pay for the compute time consumed. This service allows developers to focus on writing code, while AWS takes care of server management, scaling, and other infrastructure concerns, which are mentioned in the provided text.

Next chapter

Development of GraphQL APIs with API Gateway and Lambda: Development of GraphQL APIs with API Gateway and Lambda

Arrow Right Icon
Download the app to earn free Certification and listen to the courses in the background, even with the screen off.