Comments (9)
I am also facing same issue when used with serverless-plugin-split-stacks
.
from serverless-api-gateway-caching.
I'm getting this same issue using serverless-plugin-split-stacks
have also tried multiple order for including these. Any chance you found a solution to this?
from serverless-api-gateway-caching.
Actually I found this package that I believe is a fork of this one and it's working:
https://www.npmjs.com/package/serverless-api-gateway-caching-split-stack
All I have to do (after spent some time looking at the code) is add this configuration:
apiGatewayCaching:
forceEnable: true
And changing the plugin to:
- serverless-api-gateway-caching-split-stack
Maybe someone can merge this in this repo?
from serverless-api-gateway-caching.
If you are using split stack you need it to place the AWS :: ApiGateway :: RestApi resource in the root. To cause that you need to use the file stacks-map.js.
if (resource.Type.includes('AWS::ApiGateway::RestApi')) {
return false;
}
Be careful, returning null or undefined is not enough.
from serverless-api-gateway-caching.
What's the order of your plugins? Order matters.
from serverless-api-gateway-caching.
- serverless-api-gateway-caching
- serverless-nested-stack
but I also tried:
- serverless-nested-stack
- serverless-api-gateway-caching
and I get the same result.
from serverless-api-gateway-caching.
For now, the only solution that I've found is to set restApiId
and restApiRootResourceId
manually:
provider:
apiGateway:
restApiId: xxxxx
restApiRootResourceId: xxxxx
How to get them: https://serverless.com/framework/docs/providers/aws/events/apigateway#manually-configuring-shared-api-gateway
Can be also set separately for stages using custom
section and variables.
from serverless-api-gateway-caching.
Same issue using serverless-plugin-split-stacks
. Any solution rather than setting the restApiId manually?
from serverless-api-gateway-caching.
The latest version of the plugin, 1.7.3, now has an improved way of finding the Rest API id, which should make it work with stack splitting plugins. The changes applied are in this PR if anyone is curious.
Please feel free to reopen the issue or raise a new one if you're still having problems.
from serverless-api-gateway-caching.
Related Issues (20)
- client certificate as cacheKeyParameters HOT 7
- Upgrade from 1.7.5 to 1.8.0 breaking API Gateway endpoint HOT 6
- Internal Server Error when setting cache key parameter request.header.Authorization HOT 2
- support for httpApi HOT 1
- Support API Gateway V2 HOT 1
- Support on cache by body on POST request HOT 6
- Serverless Offline error HOT 4
- Caching stops working as soon as I set cacheKeyParameters HOT 1
- Is there a way to invalidate all caches for a specific key? HOT 2
- Invalid logging level specified: null on v1.10.0 HOT 3
- Is it possible to ignore non 200 responses? HOT 1
- Getting a bunch of APIs with "Inherit from stage" unexpectedly HOT 4
- TTL configs not applied by Api Gateway HOT 1
- /proxy - cache miss on every request - NestJs HOT 1
- Support Chinese characters in cacheKeyParameters HOT 4
- New serverless release not compliant with pulgin HOT 2
- cacheKeyParameters are always required as of 1.10.3
- Unable to set cache key from the request context HOT 1
- API gateway cacheKeyParameters error HOT 2
- headers caching for multi-tenant HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-api-gateway-caching.