Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_2_2,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
});
```

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_2_2,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
});

// 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_2_2,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
});

// 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_2_2,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
});
```

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 @@ -112,6 +112,16 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_2_2 = new Runtime('syn-nodejs-2.2');

/**
* `syn-nodejs-puppeteer-3.0` 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.0
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_3_0 = new Runtime('syn-nodejs-puppeteer-3.0');

/**
* @param name The name of the runtime version
*/
Expand Down
4 changes: 2 additions & 2 deletions 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_2_0,
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_0,
});

// THEN
Expand Down Expand Up @@ -355,4 +355,4 @@ test('can specify custom test', () => {
};`,
},
});
});
});