From f8ac33c346b924e6f6862e461cb02617a74d9a6d Mon Sep 17 00:00:00 2001 From: Douglas Naphas Date: Fri, 18 Mar 2022 20:26:30 -0400 Subject: [PATCH] Grant the WS handlers RW access to the Table gh-250 --- lib/madliberation-webapp.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/madliberation-webapp.ts b/lib/madliberation-webapp.ts index dac6f183..38cb0d61 100644 --- a/lib/madliberation-webapp.ts +++ b/lib/madliberation-webapp.ts @@ -441,6 +441,9 @@ export class MadliberationWebapp extends Stack { const connectHandler = makeWSHandler("Connect"); const disconnectHandler = makeWSHandler("Disconnet"); const defaultHandler = makeWSHandler("Default"); + [connectHandler, disconnectHandler, defaultHandler].forEach((handler) => { + sedersTable.grantReadWriteData(handler); + }); const webSocketApi = new apigwv2.WebSocketApi(this, "WSAPI", { connectRouteOptions: { integration: new apigwv2i.WebSocketLambdaIntegration(