Explain it simpler
Amazon API Gateway is the front door to your backend. Before letting a request in, it can check who is knocking, in one of a few ways. Callers that already have AWS credentials can sign their requests, like stamping a letter with an official seal. App users who signed in with Cognito can show their login token, and the gateway checks it for you. If you use some other login system, you can write a small function that inspects the request and says yes or no. API keys are different: they are like a loyalty card number. They tell you which customer is calling so you can limit how much they use, but anyone who copies the number can use it, so they do not prove identity.
Tomas leads the API team at Brightwater Weather Data. Three kinds of callers want in: the company's own mobile app users, an internal billing service running on Lambda, and a growing list of partner companies who pay for higher request volumes. Last month a partner's API key appeared in a public code snippet, and someone used it for a weekend of free forecasts. Tomas's manager asks a pointed question in the review meeting: 'If API keys are not security, what is protecting this API?' Tomas needs a clear answer for each kind of caller.
Amazon API Gateway can check who is calling before a request ever reaches your backend, which saves your Lambda functions or servers from handling unauthorized traffic. Each method in a REST API (or each route in an HTTP API) chooses an authorization type, and the exam expects you to match the option to the kind of caller. There are three real authorization mechanisms, plus API keys, which are about identification and metering rather than security.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 6 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.