@@ -118,6 +118,71 @@ export function override(resources: AmplifyApiGraphQlResourceStackTemplate) {
118118}
119119```
120120
121+ ### Example - Configure OpenSearch Streaming function name
122+ Override the name of the AWS Lambda searchable streaming function
123+
124+ ``` ts
125+ import { AmplifyApiGraphQlResourceStackTemplate } from ' @aws-amplify/cli-extensibility-helper' ;
126+
127+ export function override(resources : AmplifyApiGraphQlResourceStackTemplate ) {
128+ resources .opensearch .OpenSearchStreamingLambdaFunction .FunctionName = ' CustomFunctionName' ;
129+ }
130+
131+ ```
132+
133+ ### Example - Configure OpenSearch instance version
134+
135+ Override the ` elasticsearchVersion ` in the OpenSearch domain created by ` @searchable `
136+
137+ ``` ts
138+ import { AmplifyApiGraphQlResourceStackTemplate } from ' @aws-amplify/cli-extensibility-helper' ;
139+
140+ export function override(resources : AmplifyApiGraphQlResourceStackTemplate ) {
141+ resources .opensearch .OpenSearchDomain .elasticsearchVersion = ' OpenSearch_1.3' ;
142+ }
143+ ```
144+ ### Example - Configure OpenSearch instance type
145+
146+ Override the type of instance launched into the OpenSearch domain created by ` @searchable `
147+
148+ ``` ts
149+ import { AmplifyApiGraphQlResourceStackTemplate } from ' @aws-amplify/cli-extensibility-helper' ;
150+
151+ export function override(resources : AmplifyApiGraphQlResourceStackTemplate ) {
152+ resources .opensearch .OpenSearchDomain .elasticsearchClusterConfig = {
153+ ... resources .opensearch .OpenSearchDomain .elasticsearchClusterConfig ,
154+ instanceType: " m3.medium.elasticsearch" ,
155+ };
156+ }
157+ ```
158+ ### Example - Configure OpenSearch instance count
159+ Override the number of instances launched into the OpenSearch domain created by ` @searchable `
160+
161+ ``` ts
162+ import { AmplifyApiGraphQlResourceStackTemplate } from ' @aws-amplify/cli-extensibility-helper' ;
163+
164+ export function override(resources : AmplifyApiGraphQlResourceStackTemplate ) {
165+ resources .opensearch .OpenSearchDomain .elasticsearchClusterConfig = {
166+ ... resources .opensearch .OpenSearchDomain .elasticsearchClusterConfig ,
167+ instanceCount : 2
168+ };
169+ }
170+ ```
171+
172+ ### Example - Configure OpenSearch EBS volume size
173+ Override the amount of disk space allocated to each instance in the OpenSearch domain created by ` @searchable `
174+
175+ ``` ts
176+ import { AmplifyApiGraphQlResourceStackTemplate } from ' @aws-amplify/cli-extensibility-helper' ;
177+
178+ export function override(resources : AmplifyApiGraphQlResourceStackTemplate ) {
179+ resources .opensearch .OpenSearchDomain .ebsOptions = {
180+ ... resources .opensearch .OpenSearchDomain .ebsOptions ,
181+ volumeSize:10
182+ }
183+ }
184+ ```
185+
121186## Customize Amplify-generated resources for @predictions directive
122187
123188Apply all the overrides in the ` override(...) ` function. For example, to add a Path to IAM role that facilitates text translation:
@@ -197,4 +262,4 @@ To map the CreatePostResolver and the relational resolvers to a stack named 'MyC
197262 "BlogpostsResolver" : "MyCustomStack" ,
198263 "PostblogResolver" : "MyCustomStack" ,
199264}
200- ```
265+ ```
0 commit comments