Config API Gateway
Next, we’ll set up the API Gateway to interact with the Lambda functions created in the previous section:
- Open API Gateway console
- Scroll down and click Build of REST API pattern
- Click OK
- Select REST for Protocol
- Select New API to create a new API
- Enter REST API name, such as: fcj-serverless-api
- Click Create API
- Click on the API just created
- Click Actions, then select Create resource
- Enter resource name, such as: books
- Then click Create Resource
So we have created a new REST API and resource for it. Next, we will create methods to interact with Lambda functions and set them:
- Create methods
- Setting and enable CORS