Serverless.ts function.events.sns.arn

Hello,

I am setting up a new Serverless TypeScript monorepo, using the aws-nodejs-typescript template. The template produces a serverless.ts file for configuration.

Adding an AWS SNS event listener for an existing SNS Topic is supported:

However, there is no corresponding attribute in the type definitions for the sns event, error below.

Please advise,

– Tim

TS2322: Type ‘{ arn: string; }’ is not assignable to type ‘Sns’. Object literal may only specify known properties, and ‘arn’ does not exist in type ‘Sns’.

awsProvider.d.ts(487, 9): The expected type comes from property ‘sns’ which is declared here on type ‘Event’

Heh, I went ahead and made an SO post while this post was hidden by “community flags”, please see the answer for solution:

(and please don’t hide this post b/c it contains a link!)