Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(synthetics): latest canary runtimes for NodeJS, Python #29132

Merged
merged 7 commits into from
Feb 16, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ const createCanaryByRuntimes = (runtime: Runtime) =>

const puppeteer39 = createCanaryByRuntimes(Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_9);
const puppeteer40 = createCanaryByRuntimes(Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0);
const puppeteer62 = createCanaryByRuntimes(Runtime.SYNTHETICS_NODEJS_PUPPETEER_6_2);
const selenium13 = createCanaryByRuntimes(Runtime.SYNTHETICS_PYTHON_SELENIUM_1_3);
const selenium20 = createCanaryByRuntimes(Runtime.SYNTHETICS_PYTHON_SELENIUM_2_0);
const selenium21 = createCanaryByRuntimes(Runtime.SYNTHETICS_PYTHON_SELENIUM_2_1);

const test = new IntegTest(app, 'IntegCanaryTest', {
testCases: [stack],
Expand All @@ -113,8 +115,10 @@ const test = new IntegTest(app, 'IntegCanaryTest', {
zipAsset,
puppeteer39,
puppeteer40,
puppeteer62,
selenium13,
selenium20,
selenium21,
].forEach((canary) => test.assertions
.awsApiCall('Synthetics', 'getCanaryRuns', {
Name: canary.canaryName,
Expand Down
62 changes: 62 additions & 0 deletions packages/aws-cdk-lib/aws-synthetics/lib/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class Runtime {
* - Chromium version 92.0.4512
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.5
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_5 = new Runtime('syn-nodejs-puppeteer-3.5', RuntimeFamily.NODEJS);

Expand All @@ -39,6 +40,7 @@ export class Runtime {
* - Chromium version 92.0.4512
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.6
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_6 = new Runtime('syn-nodejs-puppeteer-3.6', RuntimeFamily.NODEJS);

Expand All @@ -53,6 +55,7 @@ export class Runtime {
* - **Lambda layer size reduced**: The size of the Lambda layer used for canaries is reduced by 34%.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.7
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_7 = new Runtime('syn-nodejs-puppeteer-3.7', RuntimeFamily.NODEJS);

Expand All @@ -66,6 +69,7 @@ export class Runtime {
* - **Profile cleanup**: Chromium profiles are now cleaned up after each canary run.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.8
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_8 = new Runtime('syn-nodejs-puppeteer-3.8', RuntimeFamily.NODEJS);

Expand All @@ -80,6 +84,7 @@ export class Runtime {
* - **Dependency upgrades**: Upgrades some third-party dependency packages.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-3.9
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS Puppeteer runtime.
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_9 = new Runtime('syn-nodejs-puppeteer-3.9', RuntimeFamily.NODEJS);

Expand Down Expand Up @@ -122,6 +127,20 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_5_1 = new Runtime('syn-nodejs-puppeteer-5.1', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-5.2` includes the following:
* - Lambda runtime Node.js 16.x
* - Puppeteer-core version 19.7.0
* - Chromium version 111.0.5563.146
*
* New Features:
* - **Updated versions of the bundled libraries in Chromium**
* - **Bug fixes**
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-5.2
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_5_2 = new Runtime('syn-nodejs-puppeteer-5.2', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-6.0` includes the following:
* - Lambda runtime Node.js 18.x
Expand All @@ -137,6 +156,36 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_6_0 = new Runtime('syn-nodejs-puppeteer-6.0', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-6.1` includes the following:
* - Lambda runtime Node.js 18.x
* - Puppeteer-core version 19.7.0
* - Chromium version 111.0.5563.146
*
* New Features:
* - **Stability improvements**: Added auto-retry logic for handling intermittent Puppeteer launch errors.
* - **Dependency upgrades**: Upgrades for some third-party dependency packages.
* - **Canaries without Amazon S3 permissions**: Bug fixes, such that canaries that don't have any Amazon S3 permissions can still run. These canaries with no Amazon S3 permissions won't be able to upload screenshots or other artifacts to Amazon S3. For more information about permissions for canaries, see Required roles and permissions for canaries.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.1
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_6_1 = new Runtime('syn-nodejs-puppeteer-6.1', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-6.2` includes the following:
* - Lambda runtime Node.js 18.x
* - Puppeteer-core version 19.7.0
* - Chromium version 111.0.5563.146
*
* New Features:
* - **Updated versions of the bundled libraries in Chromium**
* - **Ephemeral storage monitoring**: This runtime adds ephemeral storage monitoring in customer accounts.
* - **Bug fixes**
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-6.1
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_6_2 = new Runtime('syn-nodejs-puppeteer-6.2', RuntimeFamily.NODEJS);

/**
* `syn-python-selenium-1.0` includes the following:
* - Lambda runtime Python 3.8
Expand Down Expand Up @@ -206,6 +255,19 @@ export class Runtime {
*/
public static readonly SYNTHETICS_PYTHON_SELENIUM_2_0 = new Runtime('syn-python-selenium-2.0', RuntimeFamily.PYTHON);

/**
* `syn-python-selenium-2.1` includes the following:
* - Lambda runtime Python 3.8
* - Selenium version 4.15.1
* - Chromium version 111.0.5563.146
*
* New Features:
* - **Updated versions of the bundled libraries in Chromium**: The Chromium and Selenium dependencies are updated to new versions.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_python_selenium.html#CloudWatch_Synthetics_runtimeversion-syn-python-selenium-2.0
*/
public static readonly SYNTHETICS_PYTHON_SELENIUM_2_1 = new Runtime('syn-python-selenium-2.1', RuntimeFamily.PYTHON);

/**
* @param name The name of the runtime version
* @param family The Lambda runtime family
Expand Down
Loading