I am trying out with the example found in CDK site. Essentially, it trying to add a lambda as event source to SQS
import * as sqs from '@aws-cdk/aws-sqs';
import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources';
import { Duration } from '@aws-cdk/core';
const queue = new sqs.Queue(this, 'MyQueue', {
visibilityTimeout: Duration.seconds(30) // default,
receiveMessageWaitTime: Duration.seconds(20) // default
});
lambda.addEventSource(new SqsEventSource(queue, {
batchSize: 10 // default
});
I am getting this error:
Argument of type 'SqsEventSource' is not assignable to parameter of type 'IEventSource'. Types of property 'bind' are incompatible.
Environment
- CLI Version 1.57.0:
- Framework Version:
- Node.js Version: v10.16.3
- OS : OSX 10.14.3
- Language (Version): TypeScript (3.8.3)
This is 🐛 Bug Report
I am trying out with the example found in CDK site. Essentially, it trying to add a lambda as event source to SQS
I am getting this error:
Argument of type 'SqsEventSource' is not assignable to parameter of type 'IEventSource'. Types of property 'bind' are incompatible.Environment
This is 🐛 Bug Report