Skip to content

Commit 6ef162a

Browse files
authored
Update to version 7.0.1 (#591)
1 parent 4253975 commit 6ef162a

40 files changed

+2563
-1935
lines changed

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ 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+
## [7.0.1] - 2025-03-14
9+
10+
### Changed
11+
12+
- Updated metrics module to support identical metrics for different resources
13+
- Updated aws-cdk-lib and aws-cdk package versions
14+
15+
### Security
16+
17+
- Upgraded esbuild to v0.25.0 for advisory [GHSA-67mh-4wv8-2f99](https://github.com/advisories/GHSA-67mh-4wv8-2f99)
18+
- Upgraded axios to 1.8.2 for advisory [GHSA-jr5f-v2jv-69x6](https://github.com/axios/axios/security/advisories/GHSA-jr5f-v2jv-69x6)
19+
20+
### Fixed
21+
22+
- Minor eslint warnings
23+
824
## [7.0.0] - 2025-01-27
925

1026
### Changed

VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.0.0
1+
7.0.1

source/constructs/cdk.json

+1-1
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-v7.0.0",
5+
"solutionVersion": "custom-v7.0.1",
66
"solutionName": "dynamic-image-transformation-for-amazon-cloudfront"
77
}
88
}

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

+13-4
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ export class BackEnd extends Construct {
228228
).toString()
229229
).toString();
230230

231-
solutionsMetrics.addLambdaInvocationCount(imageHandlerLambdaFunction.functionName);
232-
solutionsMetrics.addLambdaBilledDurationMemorySize([imageHandlerLogGroup], "BilledDurationMemorySizeQuery");
231+
solutionsMetrics.addLambdaInvocationCount({ functionName: imageHandlerLambdaFunction.functionName });
232+
solutionsMetrics.addLambdaBilledDurationMemorySize({
233+
logGroups: [imageHandlerLogGroup],
234+
queryDefinitionName: "BilledDurationMemorySizeQuery",
235+
});
233236
solutionsMetrics.addQueryDefinition({
234237
logGroups: [imageHandlerLogGroup],
235238
queryString: new QueryString({
@@ -246,8 +249,14 @@ export class BackEnd extends Construct {
246249
queryDefinitionName: "RequestInfoQuery",
247250
});
248251

249-
solutionsMetrics.addCloudFrontMetric(conditionalCloudFrontDistributionId, "Requests");
250-
solutionsMetrics.addCloudFrontMetric(conditionalCloudFrontDistributionId, "BytesDownloaded");
252+
solutionsMetrics.addCloudFrontMetric({
253+
distributionId: conditionalCloudFrontDistributionId,
254+
metricName: "Requests",
255+
});
256+
solutionsMetrics.addCloudFrontMetric({
257+
distributionId: conditionalCloudFrontDistributionId,
258+
metricName: "BytesDownloaded",
259+
});
251260

252261
Aspects.of(solutionsMetrics).add(new ConditionAspect(props.sendAnonymousStatistics));
253262

source/constructs/lib/dashboard/ops-insights-dashboard.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3+
34
import { Aws, CfnCondition, Duration } from "aws-cdk-lib";
45
import { Dashboard, PeriodOverride, TextWidget } from "aws-cdk-lib/aws-cloudwatch";
56
import { Size, DefaultGraphWidget, DefaultSingleValueWidget } from "./widgets";

source/constructs/lib/dashboard/sih-metrics.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3+
34
import { MathExpression, Metric } from "aws-cdk-lib/aws-cloudwatch";
45

5-
/** Properties for configuring metrics
6+
/**
7+
Properties for configuring metrics
68
*/
79
export interface MetricProps {
810
/** The name of the backend Lambda function to monitor */

source/constructs/lib/dashboard/widgets.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3+
34
import {
45
GraphWidget,
56
GraphWidgetProps,
@@ -48,7 +49,7 @@ export interface DefaultSingleValueWidgetProps extends Omit<SingleValueWidgetPro
4849

4950
/**
5051
* Creates a standardized graph widget which adds a RUNNING_SUM line to the metric being graphed
51-
* @extends GraphWidget
52+
* @augments GraphWidget
5253
*/
5354
export class RunningSumGraphWidget extends GraphWidget {
5455
constructor(props: GraphWidgetProps) {
@@ -72,7 +73,7 @@ export class RunningSumGraphWidget extends GraphWidget {
7273

7374
/**
7475
* Creates a standardized graph widget with running sum functionality
75-
* @extends RunningSumGraphWidget
76+
* @augments RunningSumGraphWidget
7677
*/
7778
export class DefaultGraphWidget extends RunningSumGraphWidget {
7879
constructor(props: DefaultGraphWidgetProps) {
@@ -102,7 +103,7 @@ export class DefaultGraphWidget extends RunningSumGraphWidget {
102103
/**
103104
* Creates a standardized single value widget which adds the provided label to the metric being graphed
104105
* and sets the period as time range by default.
105-
* @extends SingleValueWidget
106+
* @augments SingleValueWidget
106107
*/
107108
export class DefaultSingleValueWidget extends SingleValueWidget {
108109
constructor(props: DefaultSingleValueWidgetProps) {

source/constructs/lib/serverless-image-stack.ts

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ export class ServerlessImageHandlerStack extends Stack {
188188
allowedPattern: "^$|^E[A-Z0-9]{8,}$",
189189
});
190190

191+
/* eslint-disable no-new */
191192
new CfnRule(this, "ExistingDistributionIdRequiredRule", {
192193
ruleCondition: Fn.conditionEquals(useExistingCloudFrontDistribution.valueAsString, "Yes"),
193194
assertions: [

0 commit comments

Comments
 (0)