File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,22 @@ 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+
179195 // Task Definition with explicit roles
180196 const taskDefinition = new ecs . FargateTaskDefinition (
181197 this ,
You can’t perform that action at this time.
0 commit comments