Skip to content

Instantly share code, notes, and snippets.

@shortjared
Created January 29, 2019 21:29
Show Gist options
  • Save shortjared/add630785bf56932c4476e7ec5f3c20b to your computer and use it in GitHub Desktop.
Save shortjared/add630785bf56932c4476e7ec5f3c20b to your computer and use it in GitHub Desktop.
Configs with serverless-api-gateway-caching plugin
service: aws-nodejs
custom:
apiGatewayCaching:
enabled: true
provider:
name: aws
runtime: nodejs8.10
functions:
hello:
handler: handler.hello
events:
- http:
path: test
method: get
private: true
cors: true
request:
parameters:
headers:
Authorization: true
caching:
enabled: true
ttlInSeconds: 60
dataEncrypted: false
perKeyInvalidation:
requireAuthorization: true
cacheKeyParameters:
- name: request.header.Authorization
plugins:
- serverless-api-gateway-caching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment