Skip to content

Conversation

kakakakakku
Copy link
Contributor

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 version nodejs16.x was 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 apply completed 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": {}
}
image

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.

};
await s3.writeGetObjectResponse(params).promise();
await s3.send(new WriteGetObjectResponseCommand(params));
Copy link
Contributor Author

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.

@@ -28,6 +28,8 @@ aws s3 cp ./images/sample.jpg s3://<bucket-name>
Download a thumbnail version of the uploaded image from the S3 Object Lambda Access Point using this command (replace `<lambda-access-point>` with the value returned in `s3_lambda_access_point`):

```shell
mkdir ./thumbs

Copy link
Contributor Author

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants