diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/lib/lambda-invoke.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/lib/lambda-invoke.ts index bbd986780b6bd..3de6a3dd7f0a2 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/lib/lambda-invoke.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/lib/lambda-invoke.ts @@ -11,7 +11,7 @@ export class LambdaInvoke extends ScheduleTargetBase implements IScheduleTarget constructor( func: lambda.IFunction, - props: ScheduleTargetBaseProps, + props: ScheduleTargetBaseProps = {}, ) { super(props, func.functionArn); this.func = func; diff --git a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/lambda-invoke.test.ts b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/lambda-invoke.test.ts index 24de4674aa16e..c0586ccedf106 100644 --- a/packages/@aws-cdk/aws-scheduler-targets-alpha/test/lambda-invoke.test.ts +++ b/packages/@aws-cdk/aws-scheduler-targets-alpha/test/lambda-invoke.test.ts @@ -24,7 +24,7 @@ describe('schedule target', () => { }); test('creates IAM role and IAM policy for lambda target in the same account', () => { - const lambdaTarget = new LambdaInvoke(func, {}); + const lambdaTarget = new LambdaInvoke(func); new Schedule(stack, 'MyScheduleDummy', { schedule: expr, @@ -89,7 +89,7 @@ describe('schedule target', () => { const lambdaVersion = new lambda.Version(stack, 'MyLambdaVersion', { lambda: func, }); - const lambdaTarget = new LambdaInvoke(lambdaVersion, {}); + const lambdaTarget = new LambdaInvoke(lambdaVersion); new Schedule(stack, 'MyScheduleDummy', { schedule: expr, @@ -250,7 +250,7 @@ describe('schedule target', () => { test('creates IAM policy for imported lambda function in the same account', () => { const importedFunc = lambda.Function.fromFunctionArn(stack, 'ImportedFunction', 'arn:aws:lambda:us-east-1:123456789012:function/somefunc'); - const lambdaTarget = new LambdaInvoke(importedFunc, {}); + const lambdaTarget = new LambdaInvoke(importedFunc); new Schedule(stack, 'MyScheduleDummy', { schedule: expr, @@ -295,7 +295,7 @@ describe('schedule target', () => { aliasName: 'SomeAliasName', }); - const lambdaTarget = new LambdaInvoke(lambdaAlias, {}); + const lambdaTarget = new LambdaInvoke(lambdaAlias); new Schedule(stack, 'MyScheduleDummy', { schedule: expr, @@ -449,7 +449,7 @@ describe('schedule target', () => { }, ); - const lambdaTarget = new LambdaInvoke(importedFunc, {}); + const lambdaTarget = new LambdaInvoke(importedFunc); new Schedule(stack, 'MyScheduleDummy', { schedule: expr, target: lambdaTarget,