Create API Gateway
Create API Gateway
In this step, you will create a REST API using Amazon API Gateway, connect it to the Lambda function created in the previous step, and then deploy it to expose a public endpoint.
Objectives:
- Create a REST API using API Gateway
- Integrate the Lambda function as the backend
- Configure the method and resource path
- Deploy the API to a public endpoint
Steps to follow:
- Access API Gateway
- Create a new API:
- Click the “Create API” button

Choose the API type:
- Select REST API (Build)
- Click Build

- In API details, choose New API
- Enter a name for your API
-Example: Visitor


- Click Create Method to add methods to the API
- Select the GET method
- Choose the Lambda function you created earlier as the integration target

- Click Create to finish

- Deloy API
- Click Deploy API, then configure as follows:

- Test if the API is working

- Go to DynamoDB to verify if the API is functioning correctly. If successful, you should see new data added to the database.

In the next section, we will begin monitoring and observing our APIs through CloudWatch.