0
0
AWScloud~10 mins

API keys and usage plans in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
A"APIKey123"
B"MyApiKey"
C"KeyName"
D"TestKey"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put the name in quotes
Using invalid characters in the name
2fill in blank
medium

Complete 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'
A{"rateLimit": 0, "burstLimit": 0}
B{"rateLimit": 100, "burstLimit": 500}
C{"rateLimit": 10, "burstLimit": 20}
D{"rateLimit": 50, "burstLimit": 100}
Attempts:
3 left
💡 Hint
Common Mistakes
Using a rate limit of zero disables requests
Not formatting the JSON correctly
3fill in blank
hard

Fix 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'
A"plan123"
B"abc123"
C"usagePlanId"
D"123abc"
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing usage plan ID with API key ID
Using invalid ID formats
4fill in blank
hard

Fill 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'
Alimit
Bperiod
CDAY
DMONTH
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up limit and period
Using invalid period values
5fill in blank
hard

Fill 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'
A{"rateLimit": 200, "burstLimit": 100}
B{"limit": 10000, "period": "MONTH"}
C"High volume plan"
D"Basic plan"
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect JSON syntax
Mixing description with JSON objects