Intro
Before we go any further with this project let us first deploy this API so that it is publicly available. Once the API is publicly available we will be able to test it outside of the AWS console with tools like Postman, and also with an actual application.
Deployment
To start the deployment find the option under Actions > Deploy API
and then we will automatically be brought into our version control section.
This makes sense because the API is existing outside of our actual codebase, unlike if we were making an Express server. We need to be able to keep track of our changes and test the API in multiple environments.
Once you deploy that you will be given a URL that you can use to access the API
and then if we go into postman and test that by sending a POST request to our route we can see that we get back our Lambda message successfully.
Which means that we have successfully made our API public.
Another reason that it is important to test the API resources on the public facing version, is to troubleshoot any CORS errors that may occur. Those wonβt show up in the API Gateway console tests.