Skip to content

Commit 56304c8

Browse files
authored
update to version v6.2.4 (#524)
1 parent 44368a7 commit 56304c8

File tree

24 files changed

+277
-15822
lines changed

24 files changed

+277
-15822
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [6.2.4] - 2023-12-06
9+
10+
### Changed
11+
12+
- node 20.x Lambda runtimes
13+
- cdk update to 2.111.0
14+
- disable gzip compression in cloudfront cache option to improve cache hit ratio [#373](https://github.com/aws-solutions/serverless-image-handler/pull/373)
15+
- requests for webp images supported for upper/lower case Accept header [#490](https://github.com/aws-solutions/serverless-image-handler/pull/490)
16+
- changed axios version to 1.6.2 for github dependabot reported vulnerability CVE-2023-45857
17+
- enabled thumbor filter chaining [#343](https://github.com/aws-solutions/serverless-image-handler/issues/343)
18+
819
## [6.2.3] - 2023-10-20
920

1021
### Fixed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In addition to the AWS Solutions Constructs, the solution uses AWS CDK directly
4444
## Prerequisites for Customization
4545

4646
- [AWS Command Line Interface](https://aws.amazon.com/cli/)
47-
- Node.js 16.x or later
47+
- Node.js 20.x or later
4848

4949
### 1. Clone the repository
5050

@@ -102,6 +102,9 @@ This solution collects anonymous operational metrics to help AWS improve the qua
102102
- [@njtmead](https://github.com/njtmead) for [#276](https://github.com/aws-solutions/serverless-image-handler/pull/276)
103103
- [@StaymanHou](https://github.com/StaymanHou) for [#320](https://github.com/aws-solutions/serverless-image-handler/pull/320)
104104
- [@alenpaulvarghese](https://github.com/alenpaulvarghese) for [#392](https://github.com/aws-solutions/serverless-image-handler/pull/392)
105+
- [@Fjool](https://github.com/Fjool) for [#489](https://github.com/aws-solutions/serverless-image-handler/pull/489)
106+
- [@fvsnippets](https://github.com/fvsnippets) for [#373](https://github.com/aws-solutions/serverless-image-handler/pull/373), [#380](https://github.com/aws-solutions/serverless-image-handler/pull/380)
107+
- [@ccchapman](https://github.com/ccchapman) for [#490](https://github.com/aws-solutions/serverless-image-handler/pull/490)
105108

106109
# License
107110

deployment/cdk-solution-helper/package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deployment/cdk-solution-helper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"adm-zip": "^0.5.10",
25-
"aws-cdk-lib": "^2.102.0"
25+
"aws-cdk-lib": "^2.111.0"
2626
},
2727
"overrides": {
2828
"semver": "7.5.4"

source/constructs/cdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"app": "npx ts-node --prefer-ts-exts bin/constructs.ts",
33
"context": {
44
"solutionId": "SO0023",
5-
"solutionVersion": "custom-v6.2.3",
5+
"solutionVersion": "custom-v6.2.4",
66
"solutionName": "serverless-image-handler"
77
}
88
}

source/constructs/lib/back-end/back-end-construct.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { CloudFrontToApiGatewayToLambda } from "@aws-solutions-constructs/aws-cl
2727

2828
import { addCfnSuppressRules } from "../../utils/utils";
2929
import { SolutionConstructProps } from "../types";
30+
import * as api from "aws-cdk-lib/aws-apigateway";
3031

3132
export interface BackEndProps extends SolutionConstructProps {
3233
readonly solutionVersion: string;
@@ -88,8 +89,8 @@ export class BackEnd extends Construct {
8889
const imageHandlerLambdaFunction = new NodejsFunction(this, "ImageHandlerLambdaFunction", {
8990
description: `${props.solutionName} (${props.solutionVersion}): Performs image edits and manipulations`,
9091
memorySize: 1024,
91-
runtime: Runtime.NODEJS_16_X,
92-
timeout: Duration.minutes(15),
92+
runtime: Runtime.NODEJS_20_X,
93+
timeout: Duration.seconds(29),
9394
role: imageHandlerLambdaFunctionRole,
9495
entry: path.join(__dirname, "../../../image-handler/index.ts"),
9596
environment: {
@@ -140,7 +141,7 @@ export class BackEnd extends Construct {
140141
defaultTtl: Duration.days(1),
141142
minTtl: Duration.seconds(1),
142143
maxTtl: Duration.days(365),
143-
enableAcceptEncodingGzip: true,
144+
enableAcceptEncodingGzip: false,
144145
headerBehavior: CacheHeaderBehavior.allowList("origin", "accept"),
145146
queryStringBehavior: CacheQueryStringBehavior.allowList("signature"),
146147
});
@@ -196,6 +197,9 @@ export class BackEnd extends Construct {
196197
stageName: "image",
197198
},
198199
binaryMediaTypes: ["*/*"],
200+
defaultMethodOptions: {
201+
authorizationType: api.AuthorizationType.NONE,
202+
},
199203
};
200204

201205
const imageHandlerCloudFrontApiGatewayLambda = new CloudFrontToApiGatewayToLambda(
@@ -210,6 +214,14 @@ export class BackEnd extends Construct {
210214
}
211215
);
212216

217+
addCfnSuppressRules(imageHandlerCloudFrontApiGatewayLambda.apiGateway, [
218+
{
219+
id: "W59",
220+
reason:
221+
"AWS::ApiGateway::Method AuthorizationType is set to 'NONE' because API Gateway behind CloudFront does not support AWS_IAM authentication",
222+
},
223+
]);
224+
213225
imageHandlerCloudFrontApiGatewayLambda.apiGateway.node.tryRemoveChild("Endpoint"); // we don't need the RestApi endpoint in the outputs
214226

215227
this.domainName = imageHandlerCloudFrontApiGatewayLambda.cloudFrontWebDistribution.distributionDomainName;

source/constructs/lib/common-resources/custom-resources/custom-resource-construct.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export class CustomResourcesConstruct extends Construct {
123123

124124
this.customResourceLambda = new NodejsFunction(this, "CustomResourceFunction", {
125125
description: `${props.solutionName} (${props.solutionVersion}): Custom resource`,
126-
runtime: Runtime.NODEJS_16_X,
126+
runtime: Runtime.NODEJS_20_X,
127127
timeout: Duration.minutes(1),
128128
memorySize: 128,
129129
role: this.customResourceRole,

0 commit comments

Comments
 (0)