Skip to content

Instantly share code, notes, and snippets.

@dansayo
Last active December 3, 2020 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansayo/a10fc6d97bd8de9900b0e612efdac3a0 to your computer and use it in GitHub Desktop.
Save dansayo/a10fc6d97bd8de9900b0e612efdac3a0 to your computer and use it in GitHub Desktop.
API Gateway set up in Zappa

A Simpler Way to setup the API key in Zappa

Steps

  1. Prior to zappa deploy stage-name, specify these 2 attributes in the zappa_settings.json
    "api_key_required": true,
    "api_key": "some existing API KEY id to use",
  1. After zappa deploy stage-name, go to AWS console

    • trace the API KEY from the api_key (ID), then

    • work back to what Usage Plan uses that API Key

    • then in that Usage Plan, do the Add API Stage, picking the Lambda function and the stage

    • save settings

  2. Test the API call in the rest client

GET https://someurl.execute-api.ap-southeast-1.amazonaws.com/dev
X-API-KEY: someapikey_gibberish_ish_ish
Content-Type: application/json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment