Course Introduction
Course Conclusion

Please note: this course has been replaced with a new course that you can find here: 

API Gateway is a fully managed service by Amazon that makes it easy for developers to create, publish, maintain and monitor their APIs at any scale without having to worry about versioning, authorizations, throttling and other administrative tasks. In this course, authored by Tehreem Siddiqui and narrated by Adam Hawkins, you will learn how to create and deploy REST API through API Gateway to expose HTTP endpoints, AWS Lambda functions and other AWS services.


Hello and welcome back to the API Gateway Course. This lesson introduces the foundation of the internet: HTTP HTTP stands for the Hypertext Transfer Protocol. Hypertext may be anything, it may be the plain text html used to maybe view the webpage you're looking at right now, images, audio files like mp3's or generally any data exchanged between two computers. HTTP follows the synchronous request and response model.

The client, or your browser for example, sends a request to the server. This server, like handles the request and sends a webpage in response. Here we see the browser's URL bar. The server here uses the https protocol which is an encrypted version of HTTP. Next the domain specifies location of the server, and finally the path indicates what we want the server to send in response. The HTTP protocol has different methods to communicate what the server should do with a particular request. There are four universal methods.

GET is the most common. Your browser sends a GET request when you visit most webpages. POST requests create new data. This is used when submitting something like a payment form. PUT requests update existing resources on a server such as updating a profile on a website. While DELETE naturally deletes resources like a blog comment. These HTTP methods describe requests.

There are also rules for describing responses. Each response includes a numeric response code. The response codes tell the client how to handle the response. They arrange from 1xx to 5xx. You may know the 200 Okay or even the dreaded 404 Not Found. Each range indicates a different kind of response. 2xx and 5xx are the most common. 2xx responses like 200 Okay or 201 Created generally mean everything went as expected. 5xx codes like 500 mean a server had a problem generating a response. 3xx covers redirection and the 4xx range indicates there are problems with the request on the client's side.

Developers can use these rules to create API's. API stands for Application Programming Interface. These are rules programs use to communicate with each other. This is how we can have things like multiple Twitter clients even though there's only one Twitter service. This is because Twitter exposes an API for other people to build programs on top of. HTTP based API's are usually modeled with Representational State Transfer or REST.

REST uses the previously mentioned HTTP methods to model requests between the client and server. Here's an example: I'm gonna make a GET request to list all the blog posts, POST to create a new blog post, PUT to update an existing one, or DELETE to delete one. Let's demonstrate with the Google Maps API. Here we make a GET request for the map of San Francisco, California. The server sends back structured data in JSON format so you can build a map from it. This is basically how many of the applications we use on a daily basis interact. Do you happen to recognize any of these screenshots?

Alright, well that's enough for the simple HTTP introduction and how it may be used to build API's. The next lesson covers how to use the Amazon API Gateway to build and expose API's for other developers.

About the Author

Tehreem is a Sr. Software Engineer with passion in Cloud Technologies, Big Data analytics, Software Testing and Automation. She has over 10 years of work experience comprising of her tenure at ServiceNow, Microsoft and Harmonic Inc. Most recently she has been developing learning content in-line with the emergence of Public Clouds and XaaS platforms with focus on AWS, Microsoft Azure and GCP. Tehreem resides in BayArea, CA with her family and when not working she enjoys nature/outdoors, movies and fine dining.