Skip to content

Commit

Permalink
Merge branch 'main' into storageTypeForDocDb
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 4, 2024
2 parents b510a54 + ee04fff commit 351d643
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/@aws-cdk/aws-scheduler-alpha/lib/schedule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Duration, IResource, Resource } from 'aws-cdk-lib';
import { Duration, IResource, Resource, Token } from 'aws-cdk-lib';
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as kms from 'aws-cdk-lib/aws-kms';
import { CfnSchedule } from 'aws-cdk-lib/aws-scheduler';
Expand Down Expand Up @@ -324,6 +324,9 @@ export class Schedule extends Resource implements ISchedule {
const flexibleTimeWindow = props.timeWindow ?? TimeWindow.off();

this.validateTimeFrame(props.start, props.end);
if (props.scheduleName && !Token.isUnresolved(props.scheduleName) && props.scheduleName.length > 64) {
throw new Error(`scheduleName cannot be longer than 64 characters, got: ${props.scheduleName.length}`);
}

const resource = new CfnSchedule(this, 'Resource', {
name: this.physicalName,
Expand Down
11 changes: 11 additions & 0 deletions packages/@aws-cdk/aws-scheduler-alpha/test/schedule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,17 @@ describe('Schedule', () => {
}).toThrow('The provided duration must be between 1 minute and 1440 minutes, got 0');
});

test('throw error when scheduleName exceeds 64 characters', () => {
const name = 'an-extremely-unnecessarily-long-name-exceeding-64-characters-in-length';
expect(() => {
new Schedule(stack, 'TestSchedule', {
schedule: expr,
target: new SomeLambdaTarget(func, role),
scheduleName: name,
});
}).toThrow(`scheduleName cannot be longer than 64 characters, got: ${name.length}`);
});

test('schedule with description', () => {
// WHEN
new Schedule(stack, 'TestSchedule', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export interface AddNetworkActionProps {
*/
export interface AddNetworkTargetsProps {
/**
* The port on which the listener listens for requests.
* The port on which the target receives traffic.
*
* @default Determined from protocol if known
*/
Expand Down
13 changes: 13 additions & 0 deletions packages/aws-cdk-lib/aws-synthetics/lib/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,19 @@ export class Runtime {
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_8_0 = new Runtime('syn-nodejs-puppeteer-8.0', RuntimeFamily.NODEJS);

/**
* `syn-nodejs-puppeteer-9.0` includes the following:
* - Lambda runtime Node.js 20.x
* - Puppeteer-core version 22.12.1
* - Chromium version 126.0.6478.126
*
* New Features:
* - **Bug fixes** Bug fix to enable visual monitoring capabilities.
*
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_nodejs_puppeteer.html#CloudWatch_Synthetics_runtimeversion-nodejs-puppeteer-9.0
*/
public static readonly SYNTHETICS_NODEJS_PUPPETEER_9_0 = new Runtime('syn-nodejs-puppeteer-9.0', RuntimeFamily.NODEJS);

/**
* `syn-python-selenium-1.0` includes the following:
* - Lambda runtime Python 3.8
Expand Down

0 comments on commit 351d643

Please sign in to comment.