An API key is a unique identifier used to control and track access to an API. It helps manage who can call the API and monitor usage.
Click to reveal answer
beginner
What is a usage plan in AWS API Gateway?
A usage plan sets limits on how many requests an API key can make. It controls the rate and quota of API calls to protect the backend and manage costs.
Click to reveal answer
intermediate
How do API keys and usage plans work together?
API keys identify the caller, and usage plans apply limits to those keys. This combination controls access and usage to keep the API safe and efficient.
Click to reveal answer
beginner
Why should you use usage plans with API keys?
Usage plans help prevent overuse or abuse by limiting requests. They ensure fair use and protect your API from unexpected traffic spikes.
Click to reveal answer
intermediate
Can you use API keys without usage plans in AWS API Gateway?
Yes, but without usage plans, you cannot set limits or quotas. This can lead to uncontrolled usage and potential service issues.
Click to reveal answer
What does an API key do in AWS API Gateway?
AIdentifies and tracks API callers
BStores API data
CRuns the API backend
DCreates API documentation
✗ Incorrect
API keys uniquely identify who is calling the API and help track usage.
What is the main purpose of a usage plan?
ATo limit API request rates and quotas
BTo create API keys
CTo store user data
DTo deploy the API
✗ Incorrect
Usage plans set limits on how many requests an API key can make to control usage.
Which of these is true about API keys and usage plans?
AAPI keys control usage limits directly
BUsage plans identify API callers
CAPI keys identify callers; usage plans set limits
DNeither are related to API security
✗ Incorrect
API keys identify the caller, and usage plans apply limits to those keys.
What happens if you use API keys without usage plans?
AAPI keys will not work
BYou can track usage but not limit it
CUsage plans are created automatically
DAPI calls are blocked
✗ Incorrect
Without usage plans, you cannot set limits, but you can still track usage with API keys.
Why are usage plans important for API management?
AThey replace API keys
BThey create API keys
CThey store API responses
DThey protect APIs from overuse and abuse
✗ Incorrect
Usage plans help protect APIs by limiting how much they can be called.
Explain how API keys and usage plans work together to manage API access in AWS.
Think about who is calling and how much they can call.
You got /3 concepts.
Describe why usage plans are important when using API keys in AWS API Gateway.
Consider what happens if there are no limits.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of an API key in AWS API Gateway?
easy
A. To monitor server CPU usage
B. To store user data securely
C. To encrypt API responses
D. To identify and control who can access the API
Solution
Step 1: Understand API key role
An API key is used to identify the client calling the API.
Step 2: Identify purpose in AWS API Gateway
It helps control and track who can access the API, not data storage or encryption.
Final Answer:
To identify and control who can access the API -> Option D
Quick Check:
API key = identify and control access [OK]
Hint: API keys identify users, not store or encrypt data [OK]
Common Mistakes:
Confusing API keys with encryption keys
Thinking API keys store user data
Assuming API keys monitor server metrics
2. Which of the following is the correct way to associate an API key with a usage plan in AWS API Gateway?
easy
A. Create a usage plan, then add the API key to it
B. Create an API key, then add a usage plan to it
C. Create a usage plan and API key separately without linking
D. Create an API key inside the usage plan settings
Solution
Step 1: Understand usage plan and API key relationship
Usage plans define limits and must have API keys linked to enforce them.
Step 2: Correct linking process
You create a usage plan first, then add API keys to it to apply limits.
Final Answer:
Create a usage plan, then add the API key to it -> Option A
Quick Check:
Usage plan first, then add API key [OK]
Hint: Link API keys by adding them to usage plans [OK]
Common Mistakes:
Trying to add usage plans to API keys
Not linking keys and plans at all
Assuming API keys are created inside usage plans
3. Given this AWS CLI command output showing usage plan limits:
Hint: Throttle = per second, quota = daily limit [OK]
Common Mistakes:
Mixing burstLimit with rateLimit
Confusing quota limit with per second limit
Ignoring the quota period
4. You created an API key and a usage plan, but API calls with the key are not limited by the usage plan. What is the most likely cause?
medium
A. The usage plan has no throttle or quota limits set
B. The API key is not associated with the usage plan
C. The API key is expired
D. The API Gateway stage is not deployed
Solution
Step 1: Check API key and usage plan link
Usage plans only apply limits if the API key is linked to them.
Step 2: Verify other causes
While no limits or deployment can cause issues, the key not linked means no limits apply.
Final Answer:
The API key is not associated with the usage plan -> Option B
Quick Check:
Key must be linked to usage plan for limits [OK]
Hint: Check if API key is linked to usage plan [OK]
Common Mistakes:
Assuming usage plan limits apply without linking keys
Ignoring deployment status
Confusing expired keys with unlinked keys
5. You want to create a usage plan that limits users to 5000 requests per month and 50 requests per second with a burst of 100. You also want to track usage per API key. Which steps correctly achieve this?
hard
A. Create usage plan with quota 5000/month and throttle 50/sec burst 100, then add API keys to the plan
B. Create API keys with limits, then assign usage plan to each key
C. Create usage plan with limits, deploy API, no need to link API keys
D. Set limits on API Gateway stage, then create API keys without usage plan
Solution
Step 1: Define usage plan with required limits
Set quota to 5000 per month and throttle to 50 requests per second with burst 100.
Step 2: Link API keys to usage plan
Adding API keys to the usage plan enables tracking and enforcement of limits per key.
Final Answer:
Create usage plan with quota 5000/month and throttle 50/sec burst 100, then add API keys to the plan -> Option A
Quick Check:
Usage plan sets limits + keys linked for tracking [OK]
Hint: Set limits in usage plan, then add API keys [OK]
Common Mistakes:
Trying to set limits on API keys directly
Not linking API keys to usage plan
Setting limits only on API Gateway stage
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.