Skip to content

Commit fe645ed

Browse files
naamancampbellElad Ben-Israel
authored andcommitted
feat(synthetics): Update CloudWatch Synthetics NodeJS runtimes (#12907)
CloudWatch Synthetics recently released new NodeJS runtimes (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html). This PR is adding them and updating docs Fixes #12906 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 6b3ba91 commit fe645ed

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

packages/@aws-cdk/aws-synthetics/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const canary = new synthetics.Canary(this, 'MyCanary', {
4444
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
4545
handler: 'index.handler',
4646
}),
47-
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_2,
47+
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
4848
});
4949
```
5050

@@ -107,7 +107,7 @@ const canary = new Canary(this, 'MyCanary', {
107107
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
108108
handler: 'index.handler', // must be 'index.handler'
109109
}),
110-
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_2,
110+
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
111111
});
112112

113113
// To supply the code from your local filesystem:
@@ -116,7 +116,7 @@ const canary = new Canary(this, 'MyCanary', {
116116
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
117117
handler: 'index.handler', // must end with '.handler'
118118
}),
119-
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_2,
119+
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
120120
});
121121

122122
// To supply the code from a S3 bucket:
@@ -125,7 +125,7 @@ const canary = new Canary(this, 'MyCanary', {
125125
code: synthetics.Code.fromBucket(bucket, 'canary.zip'),
126126
handler: 'index.handler', // must end with '.handler'
127127
}),
128-
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_2,
128+
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
129129
});
130130
```
131131

packages/@aws-cdk/aws-synthetics/lib/canary.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ export class Runtime {
112112
*/
113113
public static readonly SYNTHETICS_NODEJS_2_2 = new Runtime('syn-nodejs-2.2');
114114

115+
/**
116+
* `syn-nodejs-puppeteer-3.0` includes the following:
117+
* - Lambda runtime Node.js 12.x
118+
* - Puppeteer-core version 5.5.0
119+
* - Chromium version 88.0.4298.0
120+
*
121+
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.0
122+
*/
123+
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_0 = new Runtime('syn-nodejs-puppeteer-3.0');
124+
115125
/**
116126
* @param name The name of the runtime version
117127
*/

packages/@aws-cdk/aws-synthetics/test/canary.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test('Canary can have generated name', () => {
4444
handler: 'index.handler',
4545
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
4646
}),
47-
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_2_0,
47+
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
4848
});
4949

5050
// THEN
@@ -355,4 +355,4 @@ test('can specify custom test', () => {
355355
};`,
356356
},
357357
});
358-
});
358+
});

0 commit comments

Comments
 (0)