-
Notifications
You must be signed in to change notification settings - Fork 60
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 20 Resize Function #54
Comments
I'm using a node.js 20 based lambda layer. I just downloaded this zip file here (as I wrote in the documentation): "The best practice for image magick for the resize function is now is to create your own lambda layer. Download this zip file from here: https://github.com/CyprusCodes/imagemagick-aws-lambda-2/tree/master/archive" Then upload that as a lambda layer in your account and reference it in the resize application (either manually or using the ARN in your .yaml file after you create it). It's ok that the architecture is ARM, the resize function isn't architecture specific. Here's what the reference looks like in my resize lamdba function: You can upgrade your layer by uploading that exact zip file (as a new layer or a new layer version) from the Lambda management console, and then reference it by incrementing the layer reference number referenced in your lambda function (if already deployed) or updating the ARN reference in the .yaml file (if not yet deployed). |
Thanks for the response! The layer itself is simple enough to interact with. I have no issue with that. However, the resizepics Lambda function has to be migrated to Node 20 which uses AWS SDK v3. Ok, it doesn't have to be, but it should be now that its 2024 and AWS has sunset the v2 SDK and older Node runtimes. I have so far unsuccessfully attempted to modernize the resizepics function to work with the newer platform. I can't seem to get my My function below is slightly different, I have changed the crop gravity to
|
@agstevens I see there's a new Lambda layer for node.js 20. I don't know node well enough to competently translate the Resize function to code that is compatible with node.js 20. I was wondering if your own code was up-to-date, and if so, could you share it?
AWS has retired older runtimes, so sticking with older versions won't be an option for long.
The text was updated successfully, but these errors were encountered: