Skip to content

Commit

Permalink
update to version v6.2.4 (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougtoppin authored Dec 15, 2023
1 parent 44368a7 commit 56304c8
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 15,822 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.2.4] - 2023-12-06

### Changed

- node 20.x Lambda runtimes
- cdk update to 2.111.0
- disable gzip compression in cloudfront cache option to improve cache hit ratio [#373](https://github.com/aws-solutions/serverless-image-handler/pull/373)
- requests for webp images supported for upper/lower case Accept header [#490](https://github.com/aws-solutions/serverless-image-handler/pull/490)
- changed axios version to 1.6.2 for github dependabot reported vulnerability CVE-2023-45857
- enabled thumbor filter chaining [#343](https://github.com/aws-solutions/serverless-image-handler/issues/343)

## [6.2.3] - 2023-10-20

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In addition to the AWS Solutions Constructs, the solution uses AWS CDK directly
## Prerequisites for Customization

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

### 1. Clone the repository

Expand Down Expand Up @@ -102,6 +102,9 @@ This solution collects anonymous operational metrics to help AWS improve the qua
- [@njtmead](https://github.com/njtmead) for [#276](https://github.com/aws-solutions/serverless-image-handler/pull/276)
- [@StaymanHou](https://github.com/StaymanHou) for [#320](https://github.com/aws-solutions/serverless-image-handler/pull/320)
- [@alenpaulvarghese](https://github.com/alenpaulvarghese) for [#392](https://github.com/aws-solutions/serverless-image-handler/pull/392)
- [@Fjool](https://github.com/Fjool) for [#489](https://github.com/aws-solutions/serverless-image-handler/pull/489)
- [@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)
- [@ccchapman](https://github.com/ccchapman) for [#490](https://github.com/aws-solutions/serverless-image-handler/pull/490)

# License

Expand Down
42 changes: 21 additions & 21 deletions deployment/cdk-solution-helper/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deployment/cdk-solution-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"adm-zip": "^0.5.10",
"aws-cdk-lib": "^2.102.0"
"aws-cdk-lib": "^2.111.0"
},
"overrides": {
"semver": "7.5.4"
Expand Down
2 changes: 1 addition & 1 deletion source/constructs/cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"app": "npx ts-node --prefer-ts-exts bin/constructs.ts",
"context": {
"solutionId": "SO0023",
"solutionVersion": "custom-v6.2.3",
"solutionVersion": "custom-v6.2.4",
"solutionName": "serverless-image-handler"
}
}
18 changes: 15 additions & 3 deletions source/constructs/lib/back-end/back-end-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { CloudFrontToApiGatewayToLambda } from "@aws-solutions-constructs/aws-cl

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

export interface BackEndProps extends SolutionConstructProps {
readonly solutionVersion: string;
Expand Down Expand Up @@ -88,8 +89,8 @@ export class BackEnd extends Construct {
const imageHandlerLambdaFunction = new NodejsFunction(this, "ImageHandlerLambdaFunction", {
description: `${props.solutionName} (${props.solutionVersion}): Performs image edits and manipulations`,
memorySize: 1024,
runtime: Runtime.NODEJS_16_X,
timeout: Duration.minutes(15),
runtime: Runtime.NODEJS_20_X,
timeout: Duration.seconds(29),
role: imageHandlerLambdaFunctionRole,
entry: path.join(__dirname, "../../../image-handler/index.ts"),
environment: {
Expand Down Expand Up @@ -140,7 +141,7 @@ export class BackEnd extends Construct {
defaultTtl: Duration.days(1),
minTtl: Duration.seconds(1),
maxTtl: Duration.days(365),
enableAcceptEncodingGzip: true,
enableAcceptEncodingGzip: false,
headerBehavior: CacheHeaderBehavior.allowList("origin", "accept"),
queryStringBehavior: CacheQueryStringBehavior.allowList("signature"),
});
Expand Down Expand Up @@ -196,6 +197,9 @@ export class BackEnd extends Construct {
stageName: "image",
},
binaryMediaTypes: ["*/*"],
defaultMethodOptions: {
authorizationType: api.AuthorizationType.NONE,
},
};

const imageHandlerCloudFrontApiGatewayLambda = new CloudFrontToApiGatewayToLambda(
Expand All @@ -210,6 +214,14 @@ export class BackEnd extends Construct {
}
);

addCfnSuppressRules(imageHandlerCloudFrontApiGatewayLambda.apiGateway, [
{
id: "W59",
reason:
"AWS::ApiGateway::Method AuthorizationType is set to 'NONE' because API Gateway behind CloudFront does not support AWS_IAM authentication",
},
]);

imageHandlerCloudFrontApiGatewayLambda.apiGateway.node.tryRemoveChild("Endpoint"); // we don't need the RestApi endpoint in the outputs

this.domainName = imageHandlerCloudFrontApiGatewayLambda.cloudFrontWebDistribution.distributionDomainName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class CustomResourcesConstruct extends Construct {

this.customResourceLambda = new NodejsFunction(this, "CustomResourceFunction", {
description: `${props.solutionName} (${props.solutionVersion}): Custom resource`,
runtime: Runtime.NODEJS_16_X,
runtime: Runtime.NODEJS_20_X,
timeout: Duration.minutes(1),
memorySize: 128,
role: this.customResourceRole,
Expand Down
Loading

0 comments on commit 56304c8

Please sign in to comment.