Skip to content

Commit

Permalink
feat(synthetics): update CloudWatch Synthetics NodeJS runtime (aws#14157
Browse files Browse the repository at this point in the history
)

fixes aws#14153

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Khufu-I authored and john-tipper committed May 10, 2021
1 parent aa3b981 commit c4c71ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-synthetics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const canary = new synthetics.Canary(this, 'MyCanary', {
code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
handler: 'index.handler',
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
});
```

Expand Down Expand Up @@ -107,7 +107,7 @@ const canary = new Canary(this, 'MyCanary', {
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
handler: 'index.handler', // must be 'index.handler'
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
});

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

// To supply the code from a S3 bucket:
Expand All @@ -125,7 +125,7 @@ const canary = new Canary(this, 'MyCanary', {
code: synthetics.Code.fromBucket(bucket, 'canary.zip'),
handler: 'index.handler', // must end with '.handler'
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
});
```

Expand Down
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-synthetics/lib/canary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_0 = new Runtime('syn-nodejs-puppeteer-3.0');

/**
* `syn-nodejs-puppeteer-3.1` includes the following:
* - Lambda runtime Node.js 12.x
* - Puppeteer-core version 5.5.0
* - Chromium version 88.0.4298.0
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.1
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_1 = new Runtime('syn-nodejs-puppeteer-3.1');

/**
* @param name The name of the runtime version
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-synthetics/test/canary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test('Canary can have generated name', () => {
handler: 'index.handler',
code: synthetics.Code.fromInline('/* Synthetics handler code */'),
}),
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
});

// THEN
Expand Down

0 comments on commit c4c71ae

Please sign in to comment.