Open pomSense opened 1 year ago
Hey, any update on this? We're experiencing the same issue with one of our projects in maintenance stage. cc: @lukesday
Hello, I wanted to check if there are any updates on the issue we discussed earlier. It seems like we are facing a similar problem in one of our projects that is currently in the maintenance stage. Just wanted to keep you in the loop about it. cc: @lukesday
In our case the code was being deployed before the config update is applied, which means the runtime update is never applied. In order to rectify this I manually updated the runtime on the lambda functions from within the AWS dashboard.
I am using AWS codebuild to deploy my application and I'm seeing the exact same issue. I'm specifying 'nodejs16.x' as the runtime but the build uses node 12. I tried what @lukesday did above but no dice. Very strange.
@mbaquerizo Same
I'm encountering a similar predicament when leveraging AWS CodeBuild for my application deployment. My specification for the runtime is 'nodejs14.x', however, it seems to revert to node 12 in the build process. I have tried replicating the steps that @lukesday recommended, but it hasn't resolved the issue. This is quite an enigmatic situation that we need to look into.
@tanuj-g have you found any alternate solution? This is blocking our production deployments at the moment. The strange part is that the default value set by @sls-next/aws-lambda seems to be node 10 (im not sure if/how this is used by the serverless-component package): https://github.com/serverless-nextjs/serverless-next.js/blob/master/packages/serverless-components/aws-lambda/src/component.ts#L42
The default used by @sls-next/serverless-component is 'nodejs14' e.g. https://github.com/serverless-nextjs/serverless-next.js/blob/master/packages/serverless-components/nextjs-component/src/component.ts#L598-L601
Where is 12 coming from?
@mbaquerizo no I haven't the solution yet. This is blocking out production deployments too at this moment
@mbaquerizo no I haven't the solution yet. This is blocking out production deployments too at this moment
@tanuj-g I found a workaround for my case. After deleting the template files in S3 .serverless
folder for my app, the build ran successfully.
Edit: I just realized my build has a sync step to prevent adding new IAM roles. It adds the .serverless folder to s3 after deploying. Every build syncs up with before and after with S3. I guess for some reason having a .serverless file with template containing runtime version 'nodejs12.x' in the local directory prevents serverless components from using the specified runtime from serverless.yml
As a heads up the underlying build mechanism for this library has been deprecated if you are using the components CLI @mbaquerizo @tanuj-g @pomSense.
Given the build machine for this is still hosted by serverless.com but no longer maintained https://github.com/serverless/components/issues/1040 it might be worth looking to re platform if you do have the chance (Possibly to sst or amplify)
Any update on this? We're faced on same issue so that our entire project deployments are stopped.
my error message is below.
serverless@2.72.2
@sls-next/serverless-component@3.6.0
InvalidParameterValueException: The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions
Any update on this? We're faced on same issue so that our entire project deployments are stopped.
my error message is below.
serverless@2.72.2
@sls-next/serverless-component@3.6.0
InvalidParameterValueException: The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions
I fixed .yml file
runtime: defaultLambda: "nodejs20.x"
and It worked
@Lee-ji-soo I tried the same settings but mine didn't work. Could you give me a sample of your pipeline?
@RaiSaugat
@Lee-ji-soo I tried the same settings but mine didn't work. Could you give me a sample of your pipeline?
If you resize image with lambda function (ex.https://s3.....?width=200) , you should also set "imageLambda" node version to 20.
defaultLambda: 'nodejs20.x'
apiLambda: 'nodejs20.x'
imageLambda: 'nodejs20.x'
my pipeline sample is below
blurblur:
component: '@sls-next/serverless-component@3.6.0'
inputs:
roleArn: 'arn:awsblurblur'
bucketName: 'blurblur'
bucketRegion: 'ap-northeast-2'
cloudfront:
distributionId: 'blurblur'
runtime:
defaultLambda: 'nodejs20.x'
apiLambda: 'nodejs20.x'
imageLambda: 'nodejs20.x'
build:
env:
NEXT_PUBLIC_ENV_NODE: 'production'
For me, the runtime setting only worked when I defined it as follows:
runtime: nodejs20.x
It seemed to ignore when setting each individual lambda version.
Issue Summary
With the recent deprecation of nodejs 12 for create/update of lambda functions, there seems to be some default setting that is causing below error even when the runtime is set as
nodejs14.x
. Is anyone else facing this?Actual behavior
When using using runtime:
it is using
nodejs12.x
as the runtime parameter somewhere.Expected behavior
When setting the runtime to
nodejs14.x
, it should set the runtime parameter as nodejs12.x.Steps to reproduce
nodejs14.x
as shown aboveserverless
commandScreenshots/Code/Configuration/Logs
Here is my yml:
I've also tried doing the runtime as a string:
Node version on local is:
14.19.0
Running in Debug mode doesn't provide any clues to me:
Versions
Checklist
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.