Open lehigh123 opened 6 months ago
You are correct, it attempts to create an index each time, if the index already exists it logs the warning but takes no further action (the index is not re-created and the existing index is left untouched) this is done to make it easier for the sample this solution is. You can comment out this section of the code to prevent this if you have certainty that the index is already in place in your cluster.
In the get_put lambda, it seems that the open search index is created on every request via:
This seems like anti-pattern and a potential waste of resources (and probably bad to emit a warning on every request). If setting this up in production what is the recommended way of creating the index only a single time?