diff --git a/lib/rag-engines/opensearch-vector/index.ts b/lib/rag-engines/opensearch-vector/index.ts index 7c5109977..d211229a4 100644 --- a/lib/rag-engines/opensearch-vector/index.ts +++ b/lib/rag-engines/opensearch-vector/index.ts @@ -46,16 +46,16 @@ export class OpenSearchVector extends Construct { let seen = new Set(); const cfnVpcEndpoint = new oss.CfnVpcEndpoint(this, "VpcEndpoint", { name: Utils.getName(props.config, "genaichatbot-vpce"), - subnetIds: props.shared.vpc.filter(obj => { - if (seen.has(obj.availabilityZone)) { + subnetIds: props.shared.vpc + .filter((obj) => { + if (seen.has(obj.availabilityZone)) { return false; - } else { + } else { seen.add(obj.availabilityZone); return true; - } - }).privateSubnets.map( - (subnet) => subnet.subnetId - ), + } + }) + .privateSubnets.map((subnet) => subnet.subnetId), vpcId: props.shared.vpc.vpcId, securityGroupIds: [sg.securityGroupId], });