-
Notifications
You must be signed in to change notification settings - Fork 1k
terraform-s3-object-lambda: Update runtime to nodejs22.x #2820
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
base: main
Are you sure you want to change the base?
terraform-s3-object-lambda: Update runtime to nodejs22.x #2820
Conversation
| Body: await resized.toBuffer(), | ||
| }; | ||
| await s3.writeGetObjectResponse(params).promise(); | ||
| await s3.send(new WriteGetObjectResponseCommand(params)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: Some error occurs. Because in Node.js 18 and later runtimes, AWS SDK v3 is bundled, so I rewrote it to v3. See articles below.
|
|
||
| ```shell | ||
| mkdir ./thumbs | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: I added mkdir command because it had the following error.
$ aws s3api get-object --bucket decent-raccoon-bucket --key sample.jpg ./thumbs/sample-thumbnail.jpg --region eu-west-1
[Errno 2] No such file or directory: './thumbs/sample-thumbnail.jpg'|
@kakakakakku - Thank you for contributing and keep the pattern up to date. |
|
it would be beneficial to add the deployment steps (terraform init, plan, apply) and stack deletion commands for end users who will be using your pattern. |
|
@marakere About the error, I created this pull request on 2025/08/23, but it seems that Amazon S3 Object Lambda cannot be newly used after 2025/11/07 for EOL. I am wondering if this service change is affecting the current behavior. What do you think?
Thanks! |
Issue #, if available:
N/A
Description of changes:
Hi😀 Thanks for the useful patterns!
To prevent future deployment issues, I updated the Lambda Node.js runtime version to
nodejs22.x.While testing
terraform-s3-object-lambda, I noticed that the Lambda runtime versionnodejs16.xwas deprecated. Although it's still deployable at the moment, it will not be allowed after October 1, 2025.https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Check
terraform applycompleted successfully and works good.$ aws s3 cp ./images/sample.jpg s3://decent-raccoon-bucket --region eu-west-1 upload: images/sample.jpg to s3://decent-raccoon-bucket/sample.jpg $ mkdir ./thumbs $ aws s3api get-object --bucket resize-olap-i4x6dzs1zybd5unxx14qx7freuw1a--ol-s3 --key sample.jpg ./thumbs/sample-thumbnail.jpg --region eu-west-1 { "ContentLength": 31891, "ContentType": "text/plain", "Metadata": {} }Thank you😀
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.