Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit aeed806

Browse files
committed
Grant read access to restaurant table for getOrderLambda
1 parent 9013d7d commit aeed806

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/order-stack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class OrderStack extends cdk.Stack {
1717
localIndexes: ['restaurantId-resourceId-index']
1818
})
1919
const menuTable = dynamodb.Table.fromTableName(this, 'MenuTable', 'menu');
20-
// const restaurantTable = dynamodb.Table.fromTableName(this, 'RestaurantTable', 'restaurants');
20+
const restaurantTable = dynamodb.Table.fromTableName(this, 'RestaurantTable', 'restaurants');
2121
const httpApiId = cdk.Fn.importValue('BeejhoHttpApiId');
2222
const httpApi = HttpApi.fromHttpApiAttributes(this, 'BeejhoHttpApi', {
2323
httpApiId
@@ -67,6 +67,7 @@ export class OrderStack extends cdk.Stack {
6767
},
6868
});
6969
ordersTableWithRestaurantIDResourceIdIndex.grantReadData(getOrderLambda);
70+
restaurantTable.grantReadData(getOrderLambda);
7071

7172
new HttpRoute(this, 'GetOrderRoute', {
7273
httpApi,

0 commit comments

Comments
 (0)