File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export interface OpenSearchResourcesProps {
1717
1818export class OpenSearchResources extends Construct {
1919 public readonly collection : VectorCollection
20+ public readonly deploymentPolicy : CfnAccessPolicy
2021
2122 constructor ( scope : Construct , id : string , props : OpenSearchResourcesProps ) {
2223 super ( scope , id )
@@ -56,7 +57,7 @@ export class OpenSearchResources extends Construct {
5657 ] ,
5758 Description : ""
5859 } ]
59- new CfnAccessPolicy ( this , "DataAccessPolicy" , {
60+ this . deploymentPolicy = new CfnAccessPolicy ( this , "DataAccessPolicy" , {
6061 name : dataAccessPolicyName ,
6162 type : "data" ,
6263 policy : JSON . stringify ( dataAccessPolicyDocument )
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export class EpsAssistMeStack extends Stack {
9393 stackName : props . stackName ,
9494 collection : openSearchResources . collection
9595 } )
96-
96+ vectorIndex . node . addDependency ( openSearchResources . deploymentPolicy )
9797 // Create VectorKnowledgeBase construct with Bedrock execution role
9898 const vectorKB = new VectorKnowledgeBaseResources ( this , "VectorKB" , {
9999 stackName : props . stackName ,
You can’t perform that action at this time.
0 commit comments