-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node.js 10.x support #156
Comments
It looks like the CustomResourceFunction is fine but that there is an issue with the image handler function. Looking at the error logs it appears that it is probably that sharp-node needs to be compiled for a specific version of Node. I am going to need this so I will take a look and see if I can get it working and if I can I will create a PR. |
I created a pull request for this. #157 To make use of it before the changes are applied to the main build you will have to follow the example for a custom deploy in the readme. Of note make sure when you build that you do it with node 10 as the problem with sharp was that it was built for NodeJS 8, I am not entirely sure if minor version differences are an issue. |
I tried compiling it for node10, and it seems to work well then. |
We are trying to update the solution in this year to support Node.js 10.x. |
Do you have any news ? (because it is almost the end of the year...) |
Hi @lmontier, Sorry for the delay in the response. We are still working on the update, and we’re planning to release it before December 31st. We’re also going to use node12 (instead of node10), since this version will be supported until April 2022 (https://aws.amazon.com/about-aws/whats-new/2019/11/aws-lambda-supports-node-js-12/). |
Will the update come before Christmas? Changes at the end of the year are generally a bad idea. It would be good if the solution is ready soon so that we can use it safely and tested. |
Hi @martin, Yes, we're planning to release it before Christmas. |
@dscpinheiro , any update? christmas is coming up soon |
HI All - The latest commit contains the Node updates. Please let us know if you need additional assistance. |
@georgebearden what is the recommended way to upgrade without any downtime? |
Hi @andidev, You should be able to update an existing stack with the latest template (https://s3.amazonaws.com/solutions-reference/serverless-image-handler/latest/serverless-image-handler.template). That will require minimum downtime since the lambda function runtime has changed. |
@andidev it depends on what sharpJS features you are using, because 0.23.3 doesn't really compatible with 0.21.3. |
@dscpinheiro can you dumb it down a little bit for me. I cant find anything on updating templates for Lambdas on AWS. |
@brad13x, here's what I meant:
|
@dscpinheiro Thank you so much! This helped a lot. Did not know about this area of the site. |
Is anyone else getting this error? 1 validation error detected: Value 'serverlessrepo-image-resizer-serviceImageHandlerFunctionRole-us-west-2' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64 (Service: AmazonIdentityManagement; Status Code: 400; Error Code: ValidationError; |
any advices? |
@brad13x When you launch the CloudFormation stack under the hood it creates IAM::Role with the name of the format The problem is that the resulting IAM::Role name should be less than or equal to 64 characters. But in your case, there are 70 characters. To solve this issue assign the CloudFormation shorter name with no more than 26-30 characters, depending on the region where you deploy the stack. Unfortunately, you can not update the CloudFormation name, so you have to delete the current stack and create the new one. Here is the field where you have to set the name with the proper length: |
I get some errors when i update the Stack with the new template file:
and
and
In the update view In the Any ideas? @georgebearden, @dscpinheiro |
Yesterday I wrongly said that updating was possible, but it turns out that is not the case. I apologize for the mistake, and I listed some alternatives on #172 (comment), and I'll make sure this information is included on the implementation guide. Again, sorry for the inconvenience. |
Hi everyone, Before I've updated the image handler to NodeJS 12.x it was possible to enter a URL like: Now, after the update, I get the following Error in CloudWatch: Is it still possible to enter only a width and get the image back with the height according to the aspect ratio? Thanks in advance! |
Hi @marco910, We had to update the version of sharp, and I believe the issue you mentioned is the same one as this: #171 Could you try this approach (#171 (comment)) and check if the problem still happens? |
Hi @dscpinheiro, Yes that's the same issue as in #171 . @mberneis is requesting the image with JSON but in my case the request is with a "normal" URL. How can I make a valid request with a URL? |
Hi @marco910, So I just tested and it doesn't look like it's possible to do the request you want via URL on v4.1. Unfortunately, as I mentioned on the other issue, we had to update sharp for compatibility with Amazon Linux 2. The alternative is to do the request via JSON, and I'll update the documentation to make that clear. |
@dscpinheiro Can't you make the handler convert a |
Yes, that's definitely an option. I'll add this change to our backlog for the next release. |
Hi, When can we expect the feature back in the image handler? |
Amazon announced that they drop support for Node8 - Switching the Node Version for the Lambda function to 10.x results in a response
Amazons Notice:
The text was updated successfully, but these errors were encountered: