File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export interface OpenSearchResourcesProps {
99 readonly stackName : string
1010 readonly bedrockExecutionRole : Role
1111 readonly region : string
12+ readonly commitId : string
1213}
1314
1415export class OpenSearchResources extends Construct {
@@ -17,9 +18,11 @@ export class OpenSearchResources extends Construct {
1718 constructor ( scope : Construct , id : string , props : OpenSearchResourcesProps ) {
1819 super ( scope , id )
1920
21+ const commitShort = props . commitId . substring ( 0 , 4 )
22+
2023 // Create the OpenSearch Serverless collection using L2 construct
2124 this . collection = new VectorCollection ( this , "Collection" , {
22- collectionName : `${ props . stackName } -vector-db` ,
25+ collectionName : `${ props . stackName } -${ commitShort } - vector-db` ,
2326 description : "EPS Assist Vector Store" ,
2427 standbyReplicas : VectorCollectionStandbyReplicas . DISABLED
2528 } )
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ export class EpsAssistMeStack extends Stack {
8080 const openSearchResources = new OpenSearchResources ( this , "OpenSearchResources" , {
8181 stackName : props . stackName ,
8282 bedrockExecutionRole : bedrockExecutionRole . role ,
83+ commitId : props . commitId ,
8384 region
8485 } )
8586
You can’t perform that action at this time.
0 commit comments