In this step, we will create a REST API.




In the Lambda function section, set the region to where your account is located, then choose the correct ARN of the getStudentData function. Finally, click Create method.

Repeat steps 1 through 4 to create another method. For Integration Type, select POST, and use the ARN of the insertStudentData function.
In the Resource interface, select Enable CORS.

In the CORS settings interface, under Access-Control-Allow-Methods, check GET and POST, then click Save.


Set the Stage name to prod, then click Deploy.

Copy the Invoke URL after the API has been successfully created.
