I have a serverless template which includes a lambda function with API gateway. I've included an api key to the template. Everything deploys fine, BUT I still receive the following type error at the end:
TypeError: Cannot read property 'apiKeys' of undefined
I can't really find any good solution to this problem. Here is a sample of my serverless template where I include the apikeys:
plugins:
- serverless-add-api-key
provider:
name: aws
timeout: 30 # Because API Gateway
runtime: python3.8
region: us-east-1
apiGateway:
apiKeys:
- MyKey
What am I missing here?
question from:https://stackoverflow.com/questions/65908409/serverless-framework-api-gateway-typeerror