Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create an API key using AWS CLI.
AWS
aws apigateway create-api-key --name [1] --enabled Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the name in quotes
Using invalid characters in the name
✗ Incorrect
The command creates an API key named "APIKey123" and enables it.
2fill in blank
mediumComplete the code to create a usage plan with a throttle rate limit.
AWS
aws apigateway create-usage-plan --name "BasicPlan" --throttle [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a rate limit of zero disables requests
Not formatting the JSON correctly
✗ Incorrect
This sets the throttle rate limit to 50 requests per second for the usage plan.
3fill in blank
hardFix the error in the command to associate an API key with a usage plan.
AWS
aws apigateway create-usage-plan-key --usage-plan-id [1] --key-id abc123 --key-type API_KEY Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing usage plan ID with API key ID
Using invalid ID formats
✗ Incorrect
The usage plan ID must be the actual ID of the usage plan, such as "plan123".
4fill in blank
hardFill both blanks to set quota period in a usage plan.
AWS
aws apigateway update-usage-plan --usage-plan-id plan123 --patch-operations op=replace,path=/quota/[1],value=[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up limit and period
Using invalid period values
✗ Incorrect
The quota period is set by replacing the 'period' path with a value DAY.
5fill in blank
hardFill all three blanks to create a usage plan with throttle and quota settings.
AWS
aws apigateway create-usage-plan --name "ProPlan" --throttle [1] --quota [2] --description [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect JSON syntax
Mixing description with JSON objects
✗ Incorrect
This creates a usage plan named "ProPlan" with throttle limits, monthly quota, and a description.