Skip to content

Commit de64792

Browse files
authored
Merge pull request #25 from texpert/develop
Release v.0.1.0
2 parents 0f367e1 + 92bb65e commit de64792

File tree

6 files changed

+687
-606
lines changed

6 files changed

+687
-606
lines changed

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
yarn 1.22.19
2-
nodejs 16.19.0
2+
nodejs 20.9.0

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An [AWS Lambda][aws_lambda] function for resizing images on demand.
66

77
Built using the [sharp][sharp] image resizing JS library, and running on the [Node.js][nodejs] runtime.
88

9-
_Note: currently Sharp is being built on Node.js version 10.x_
9+
_Note: currently Sharp is being built on Node.js version 20.x_
1010

1111
On invocation, the Lambda function will fetch the image from the 'original' S3 bucket, resize the image, upload both
1212
the original and the resized image to the target S3 bucket, and return the resulting filenames to a specified
@@ -54,13 +54,16 @@ On MacOS:
5454

5555
### Local testing
5656

57-
Or, to invoke and debug locally, run the `lambda_start.js` module, which uses the [Commandline tool to run Amazon Lambda function on local machines][lambda-local]:
57+
To invoke and debug locally:
58+
59+
- Upload the `florsan_homepage.png` file into the `cache` AWS S3 bucket
60+
- Run the `lambda_start.js` module, which uses the [Commandline tool to run Amazon Lambda function on local machines][lambda-local]:
5861

5962
```
6063
$ node test/lambda_start.js
6164
```
6265

63-
Install globally the [AWS SAM Local][aws_sam_local] package.
66+
Or, install globally the [AWS SAM Local][aws_sam_local] package.
6467

6568
```
6669
$ npm install -g aws-sam-local
@@ -217,4 +220,4 @@ This [AWS Lambda][aws_lambda] function is [licensed][license] under Apache 2.0.
217220
[lambda-local]: https://github.com/ashiina/lambda-local
218221
[license]: LICENSE
219222
[nodejs]: https://nodejs.org/en/
220-
[sharp]: https://github.com/lovell/sharp
223+
[sharp]: https://github.com/lovell/sharp

florsan_homepage.png

6.03 MB
Loading

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "lambda-image-resize.js",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"description": "On demand image resizing AWS Lambda function",
55
"author": "Aurel Branzeanu <[email protected]>",
66
"license": "Apache-2.0",
77
"main": "index.js",
88
"dependencies": {
9-
"node-gyp": "^5.0.7",
9+
"node-gyp": "^10.0.1",
1010
"sharp": "^0.32.6"
1111
},
1212
"devDependencies": {
13-
"aws-sdk": "^2.596",
14-
"lambda-local": "^1.6.3"
13+
"aws-sdk": "^2.1499",
14+
"lambda-local": "^2.1.2"
1515
},
1616
"repository": {
1717
"type": "git",

template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Resources:
77
Properties:
88
CodeUri: ./
99
Handler: index.handler
10-
Runtime: nodejs16.x
10+
Runtime: nodejs20.x
1111
MemorySize: 1536
1212
Timeout: 60
1313

@@ -16,4 +16,4 @@ Resources:
1616
Properties:
1717
FunctionName: !Ref ImageResizeOnDemand
1818
Action: lambda:InvokeFunction
19-
Principal: "arn:aws:iam::978552873556:user/texpert"
19+
Principal: "arn:aws:iam::978552873556:user/texpert"

0 commit comments

Comments
 (0)