Skip to content

Commit b79f053

Browse files
authored
Merge pull request #81 from ModusCreateOrg/ADE-66
[ADE-66] followup to implementing the frontend of processing and showing the reports
2 parents a5a9fd8 + d126e79 commit b79f053

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

backend/src/iac/backend-stack.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,31 @@ export class BackendStack extends cdk.Stack {
176176
}),
177177
);
178178

179+
// Add Amazon Textract permissions for document analysis
180+
taskRole.addToPolicy(
181+
new iam.PolicyStatement({
182+
effect: iam.Effect.ALLOW,
183+
actions: [
184+
'textract:AnalyzeDocument',
185+
'textract:DetectDocumentText',
186+
'textract:GetDocumentAnalysis',
187+
'textract:StartDocumentAnalysis',
188+
'textract:StartDocumentTextDetection',
189+
'textract:GetDocumentTextDetection',
190+
],
191+
resources: ['*'], // You may want to restrict this to specific resources in production
192+
}),
193+
);
194+
195+
// Add Amazon Bedrock permissions for model invocation
196+
taskRole.addToPolicy(
197+
new iam.PolicyStatement({
198+
effect: iam.Effect.ALLOW,
199+
actions: ['bedrock:InvokeModel'],
200+
resources: ['*'],
201+
}),
202+
);
203+
179204
// Task Definition with explicit roles
180205
const taskDefinition = new ecs.FargateTaskDefinition(
181206
this,

frontend/src/common/hooks/useTimeout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useRef } from 'react';
44
* Custom hook for handling setTimeout with cleanup
55
*/
66
export const useTimeout = () => {
7-
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
7+
const timeoutRef = useRef<number | null>(null);
88

99
// Clear the timeout when component unmounts or when called manually
1010
const clearTimeout = useCallback(() => {

0 commit comments

Comments
 (0)