Skip to content

Commit 6a98ad9

Browse files
author
@tomnight
committed
Update to version v5.1.0
1 parent 2c0327c commit 6a98ad9

35 files changed

+4318
-2671
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
**Checklist**
1111
- [ ] :wave: I have run the unit tests, and all unit tests have passed.
12-
- [ ] :warning: This pull request migh incur a breaking change.
12+
- [ ] :warning: This pull request might incur a breaking change.
1313

1414
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,37 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [5.0] - 2020-08-31
7+
## [5.1.0] - 2020-11-19
8+
### ⚠ BREAKING CHANGES
9+
- **Image URL Signature**: When image URL signature is enabled, all URLs including existing URLs should have `signature` query parameter.
10+
11+
### Added
12+
- Image URL signature: [#111](https://github.com/awslabs/serverless-image-handler/issues/111), [#203](https://github.com/awslabs/serverless-image-handler/issues/203), [#221](https://github.com/awslabs/serverless-image-handler/issues/221), [#227](https://github.com/awslabs/serverless-image-handler/pull/227)
13+
- AWS Lambda `413` error handling. When the response payload is bigger than 6MB, it throws `TooLargeImageException`: [#35](https://github.com/awslabs/serverless-image-handler/issues/35), [#97](https://github.com/awslabs/serverless-image-handler/issues/97), [#193](https://github.com/awslabs/serverless-image-handler/issues/193), [#204](https://github.com/awslabs/serverless-image-handler/issues/204)
14+
- Default fallback image: [#137](https://github.com/awslabs/serverless-image-handler/issues/137)
15+
- Unit tests for custom resource: `100%` coverage
16+
- Add `SVG` support. When any edits are used, the output would be automatically `PNG` unless the output format is specified: [#31](https://github.com/awslabs/serverless-image-handler/issues/31), [#234](https://github.com/awslabs/serverless-image-handler/issues/234)
17+
- Custom headers: [#182](https://github.com/awslabs/serverless-image-handler/pull/182)
18+
- Enabling ALB Support : [#201](https://github.com/awslabs/serverless-image-handler/pull/201)
19+
20+
### Fixed
21+
- Thumbor paths broken if they include "-" and "100x100": [#208](https://github.com/awslabs/serverless-image-handler/issues/208)
22+
- Rewrite doesn't seem to be working: [#121](https://github.com/awslabs/serverless-image-handler/issues/121)
23+
- Correct EXIF: [#197](https://github.com/awslabs/serverless-image-handler/issues/197), [#220](https://github.com/awslabs/serverless-image-handler/issues/220), [#235](https://github.com/awslabs/serverless-image-handler/issues/235), [#236](https://github.com/awslabs/serverless-image-handler/issues/236), [#240](https://github.com/awslabs/serverless-image-handler/issues/240)
24+
- Sub folder support in Thumbor `watermark` filter: [#231](https://github.com/awslabs/serverless-image-handler/issues/231)
25+
26+
### Changed
27+
- AWS CDK and AWS Solutions Constructs version (from 1.57.0 to 1.64.1)
28+
- sharp base version (from 0.25.4 to 0.26.1)
29+
- Refactors the custom resource Lambda source code
30+
- Migrate unit tests to use `jest`
31+
- Move all `aws-sdk` in `ImageHandler` Labmda function to `index.js` for the best practice
32+
- Enhance the default error message not to show empty JSON: [#206](https://github.com/awslabs/serverless-image-handler/issues/206)
33+
34+
### Removed
35+
- Remove `manifest-generator`
36+
37+
## [5.0.0] - 2020-08-31
838
### Added
939
- AWS CDK and AWS Solutions Constructs to create AWS CloudFormation template
1040

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
190+
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

NOTICE.txt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
Serverless Image Handler
2-
3-
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43

54
**********************
65
THIRD PARTY COMPONENTS
76
**********************
87
This software includes third party software subject to the following copyrights:
98

109
aws-sdk under the Apache License Version 2.0
11-
aws-sdk-mock under the Apache License Version 2.0
12-
Bootstrap under the Massachusetts Institute of Technology (MIT) license
13-
chai under the Massachusetts Institute of Technology (MIT) license
14-
minimist under the Massachusetts Institute of Technology (MIT) license
10+
axios under the Massachusetts Institute of Technology (MIT) license
11+
axios-mock-adapter under the Massachusetts Institute of Technology (MIT) license
12+
bootstrap under the Massachusetts Institute of Technology (MIT) license
13+
color under the Massachusetts Institute of Technology (MIT) license
14+
color-name under the Massachusetts Institute of Technology (MIT) license
15+
jest under the Massachusetts Institute of Technology (MIT) license
1516
mocha under the Massachusetts Institute of Technology (MIT) license
16-
moment under the Massachusetts Institute of Technology (MIT) license
17-
npm-run-all under the Massachusetts Institute of Technology (MIT) license
18-
nyc under the ISC license
1917
sharp under the Apache License Version 2.0
20-
sinon under the BSD-3-Clause license
21-
sinon-chai under the BSD-2-Clause license
22-
uuid under the Massachusetts Institute of Technology (MIT) license
23-
color under the Massachusetts Institute of Technology (MIT) license
24-
color-name under the Massachusetts Institute of Technology (MIT) license
18+
uuid under the Massachusetts Institute of Technology (MIT) license

README.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
**_Important Notice:_**
2-
Due to a [change in the AWS Lambda execution environment](https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/), Serverless Image Handler v3 deployments are functionally broken. To address the issue we have released [minor version update v3.1.1](https://solutions-reference.s3.amazonaws.com/serverless-image-handler/v3.1.1/serverless-image-handler.template). We recommend all users of v3 to run cloudformation stack update with v3.1.1. Additionally, we suggest you to look at v4 of the solution and migrate to v4 if it addresses all of your use cases.
2+
Due to a [change in the AWS Lambda execution environment](https://aws.amazon.com/blogs/compute/upcoming-updates-to-the-aws-lambda-execution-environment/), Serverless Image Handler v3 deployments are functionally broken. To address the issue we have released [minor version update v3.1.1](https://solutions-reference.s3.amazonaws.com/serverless-image-handler/v3.1.1/serverless-image-handler.template). We recommend all users of v3 to run cloudformation stack update with v3.1.1. Additionally, we suggest you to look at v5 of the solution and migrate to v5 if it addresses all of your use cases.
33

44
# AWS Serverless Image Handler Lambda wrapper for SharpJS
55
A solution to dynamically handle images on the fly, utilizing Sharp (https://sharp.pixelplumbing.com/en/stable/).
66
Published version, additional details and documentation are available here: https://aws.amazon.com/solutions/serverless-image-handler/
77

8-
_Note:_ it is recommend to build the application binary on Amazon Linux.
8+
_Note:_ it is recommended to build the application binary on Amazon Linux.
99

1010
## On This Page
1111
- [Architecture Overview](#architecture-overview)
@@ -14,7 +14,7 @@ _Note:_ it is recommend to build the application binary on Amazon Linux.
1414
- [License](#license)
1515

1616
## Architecture Overview
17-
![Architecture](architecture.jpeg)
17+
![Architecture](architecture.png)
1818

1919
The AWS CloudFormation template deploys an Amazon CloudFront distribution, Amazon API Gateway REST API, and an AWS Lambda function. Amazon CloudFront provides a caching layer to reduce the cost of image processing and the latency of subsequent image delivery. The Amazon API Gateway provides endpoint resources and triggers the AWS Lambda function. The AWS Lambda function retrieves the image from the customer's Amazon Simple Storage Service (Amazon S3) bucket and uses Sharp to return a modified version of the image to the API Gateway. Additionally, the solution generates a CloudFront domain name that provides cached access to the image handler API.
2020

@@ -81,19 +81,11 @@ aws s3 sync ./global-s3-assets/ s3://$DIST_OUTPUT_BUCKET-$REGION/$SOLUTION_NAME/
8181
- [@john-shaffer](https://github.com/john-shaffer) for [#158](https://github.com/awslabs/serverless-image-handler/pull/158)
8282
- [@toredash](https://github.com/toredash) for [#174](https://github.com/awslabs/serverless-image-handler/pull/174), [#195](https://github.com/awslabs/serverless-image-handler/pull/195)
8383
- [@lith-imad](https://github.com/lith-imad) for [#194](https://github.com/awslabs/serverless-image-handler/pull/194)
84+
- [@pch](https://github.com/pch) for [#227](https://github.com/awslabs/serverless-image-handler/pull/227)
85+
- [@atrope](https://github.com/atrope) for [#201](https://github.com/awslabs/serverless-image-handler/pull/201)
86+
- [@bretto36](https://github.com/bretto36) for [#182](https://github.com/awslabs/serverless-image-handler/pull/182)
8487

8588
***
8689
## License
87-
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
88-
89-
Licensed under the Apache License, Version 2.0 (the "License");
90-
you may not use this file except in compliance with the License.
91-
You may obtain a copy of the License at
92-
93-
http://www.apache.org/licenses/LICENSE-2.0
94-
95-
Unless required by applicable law or agreed to in writing, software
96-
distributed under the License is distributed on an "AS IS" BASIS,
97-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
98-
See the License for the specific language governing permissions and
99-
limitations under the License.
90+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.<br />
91+
SPDX-License-Identifier: Apache-2.0

architecture.jpeg

-46.6 KB
Binary file not shown.

architecture.png

153 KB
Loading

deployment/build-s3-dist.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ cp dist/custom-resource.zip $build_dist_dir/custom-resource.zip
7676
echo "------------------------------------------------------------------------------"
7777
echo "Generate the demo-ui manifest document"
7878
echo "------------------------------------------------------------------------------"
79-
cd $template_dir/manifest-generator
80-
npm install
81-
node app.js --target ../../source/demo-ui --output $build_dist_dir/demo-ui-manifest.json
79+
cd $source_dir/demo-ui
80+
manifest=(`find * -type f ! -iname ".DS_Store"`)
81+
manifest_json=$(IFS=,;printf "%s" "${manifest[*]}")
82+
echo "{\"files\":[\"$manifest_json\"]}" | sed 's/,/","/g' >> $build_dist_dir/demo-ui-manifest.json

deployment/manifest-generator/app.js

Lines changed: 0 additions & 63 deletions
This file was deleted.

deployment/manifest-generator/package.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)