Skip to content

Commit e7b8a04

Browse files
committed
wip
1 parent 0d71011 commit e7b8a04

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

cdk/resources/WebsocketAPI.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -340,32 +340,6 @@ export class WebsocketAPI extends Construct {
340340
},
341341
)
342342

343-
const publishLwm2mShadowUpdatesRule = new IoT.CfnTopicRule(
344-
this,
345-
'publishLwm2mShadowUpdatesRule',
346-
{
347-
topicRulePayload: {
348-
description: `Publish lwm2m shadow updates to the Websocket API`,
349-
ruleDisabled: false,
350-
awsIotSqlVersion: '2016-03-23',
351-
sql: `SELECT current.state.reported AS reported, topic(3) as deviceId FROM '$aws/things/+/shadow/name/lwm2m/update/documents'`,
352-
actions: [
353-
{
354-
lambda: {
355-
functionArn: publishToWebsocketClients.functionArn,
356-
},
357-
},
358-
],
359-
errorAction: {
360-
republish: {
361-
roleArn: publishToWebsocketClientsRuleRole.roleArn,
362-
topic: 'errors',
363-
},
364-
},
365-
},
366-
},
367-
)
368-
369343
publishToWebsocketClients.addPermission(
370344
'invokeByPublishShadowUpdatesRulePermission',
371345
{
@@ -375,15 +349,6 @@ export class WebsocketAPI extends Construct {
375349
sourceArn: publishShadowUpdatesRule.attrArn,
376350
},
377351
)
378-
publishToWebsocketClients.addPermission(
379-
'invokeByPublishLwm2mShadowUpdatesRulePermission',
380-
{
381-
principal: new IAM.ServicePrincipal(
382-
'iot.amazonaws.com',
383-
) as IAM.IPrincipal,
384-
sourceArn: publishLwm2mShadowUpdatesRule.attrArn,
385-
},
386-
)
387352

388353
const publishMessagesRule = new IoT.CfnTopicRule(
389354
this,

0 commit comments

Comments
 (0)