Comments (8)
Hi @icholy ,
How is the node version upgrade (which includes the upgrade to the v3 of the AWS SDK) affecting you?
The node version and the SDK are internal details of the warmer lambda that is created.
The actual configuration and API doesn't change at all.
from serverless-plugin-warmup.
My projects have sdk v2 listed in their dependencies. The builds start failing with the new version of the warmup plugin because the v3 sdk is missing.
from serverless-plugin-warmup.
I see.
When you deploy, you shouldn't have an explicit dependency on AWS SDK since it's already globally installed in all lambdas.
If you are using serverless-offline or some other approach to run locally, then you need to install it and that's probably what you are hitting.
I can agree. That last update can be considered a major version due to that.
from serverless-plugin-warmup.
In my case, it was the webpack serverless plugin failing to resolve the v3 SDK. I only have a rule for excluding the v2 SDK from the bundle.
from serverless-plugin-warmup.
I see.
As you probably know the order in which you declare plugins in your serverless.yaml
matters.
It's important that you configure serverless-plugin-warmup
after webpack or any other plugin that tampers with the lambdas. That way the warmer code won't be transpiled (there is no need to) and it will just work.
from serverless-plugin-warmup.
Changing the plugin order doesn't seem to have an effect. I think this is because the warmers are added in the after:package:initialize
hook and the webpack bundling happens in the before:package:createDeploymentArtifact
hook which will always happen after.
Adding /@aws-sdk\/.*/
to my webpack externals
makes it work though.
from serverless-plugin-warmup.
Oh, true that.
Actually, the warmer is re-added on before:package:createDeploymentArtifact
just to deal with the webpack plugin modifying and breaking things...
I already told the Serverless guys that they should provide better guidance on the lifecycle events to ensure that plugins use them consistently and we avoid this issues. But it didn't get anywhere. See serverless/serverless#10646
I agree that adding the SDK to externals is the way to go.
from serverless-plugin-warmup.
Thanks for your help with this.
from serverless-plugin-warmup.
Related Issues (20)
- Packaging should not include service level patterns HOT 2
- Alternative event bus HOT 5
- Customizable Warmup endpoint HOT 7
- warmup not working: is it because I use docker or I did something wrong? HOT 6
- Not working with Serverless Webpack HOT 2
- Is @aws-sdk/client-lambda now a peer dependency? HOT 2
- Websocket warmup HOT 2
- warm up plugin webpack bundling issue HOT 5
- Review lifecycle hooks of different plugins to ensure that there are no issues HOT 1
- FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory HOT 2
- Is the pricing still accurate in Readme? HOT 1
- Deployment failed on Windows when using warmup plugin HOT 2
- getting issue when we update nodejs 18.x HOT 2
- How to disable warmers by default, and enable them only for specific lambdas? HOT 2
- Missing folders in warmup lambda once deployed on newer serverless versions HOT 3
- Missing configuration option `alias` from schema
- [Clarification] What is prewarm actually doing? HOT 1
- v8.2.1 requires custom config when used with serverless-esbuild HOT 7
- Description error? HOT 3
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-plugin-warmup.