diff --git a/packages/aws-cdk-lib/aws-sns-subscriptions/lib/sqs.ts b/packages/aws-cdk-lib/aws-sns-subscriptions/lib/sqs.ts index c98808c063a48..f713fe6bb6ead 100644 --- a/packages/aws-cdk-lib/aws-sns-subscriptions/lib/sqs.ts +++ b/packages/aws-cdk-lib/aws-sns-subscriptions/lib/sqs.ts @@ -33,7 +33,7 @@ export class SqsSubscription implements sns.ITopicSubscription { public bind(topic: sns.ITopic): sns.TopicSubscriptionConfig { // Create subscription under *consuming* construct to make sure it ends up // in the correct stack in cases of cross-stack subscriptions. - if (!(this.queue instanceof Construct)) { + if (!Construct.isConstruct(this.queue)) { throw new Error('The supplied Queue object must be an instance of Construct'); } const snsServicePrincipal = new iam.ServicePrincipal('sns.amazonaws.com');