Skip to content

Commit ce70ca7

Browse files
authored
Added a callout for Removal Policy
1 parent 63616a6 commit ce70ca7

File tree

1 file changed

+13
-0
lines changed
  • src/pages/[platform]/build-a-backend/data/custom-business-logic/search-and-aggregate-queries

1 file changed

+13
-0
lines changed

src/pages/[platform]/build-a-backend/data/custom-business-logic/search-and-aggregate-queries/index.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,24 @@ const openSearchDomain = new opensearch.Domain(
148148
{
149149
version: opensearch.EngineVersion.OPENSEARCH_2_11,
150150
nodeToNodeEncryption: true,
151+
// set removalPolicy to DESTROY for sandbox environemnt
152+
// removalPolicy: RemovalPolicy.DESTROY,
151153
encryptionAtRest: {
152154
enabled: true
153155
}
154156
}
155157
);
156158
// highlight-end
157159
```
160+
<Callout>
161+
162+
Important considerations:
163+
164+
We recommend enabling the `removalPolicy` for sandbox environments.
165+
By default, OpenSearch instances are not deleted when you run `npx ampx delete`, as the default removal policy is set to retain the resource.
166+
167+
</Callout>
168+
158169

159170
## Step 3: Setting Up Zero ETL from DynamoDB to OpenSearch
160171

@@ -220,6 +231,8 @@ const openSearchDomain = new opensearch.Domain(
220231
{
221232
version: opensearch.EngineVersion.OPENSEARCH_2_11,
222233
nodeToNodeEncryption: true,
234+
// set removalPolicy to DESTROY for sandbox environemnt
235+
// removalPolicy: RemovalPolicy.DESTROY,
223236
encryptionAtRest: {
224237
enabled: true,
225238
},

0 commit comments

Comments
 (0)