Creating an API using API Gateway
We are going to create a simple API that accepts a request from a client. The API accepts two numbers, sums up two numbers in a Lambda function, and returns the calculated values. AWS Lambda is going to be implemented via Python. You can see the high-level flow in the following architecture:
Figure 9.2 – Data flow
We are going to start with the Lambda function creation. After the Lambda function creation, API Gateway is going to be set up with Lambda integration.
Let’s create the Lambda function step by step:
- Open the console and navigate to the AWS Lambda page:
Figure 9.3 – Lambda function
- Create a new Lambda function. Let’s name it
SumUpLambda
:
Figure 9.4 – Creating a new Lambda function
- Click Create function and wait a few seconds while the function is created:
Figure...