Migrate data from one AWS Elasticsearch cluster to another.

What is Dash Python?

“Small Tweak before we begin”

def attach_snapshot_repo(self, vpc_host, snapshot_repo_name):
print(vpc_host,snapshot_repo_name)
path = '_snapshot/'+snapshot_repo_name
url = vpc_host+ path
payload = {
"type": "s3",
"settings": {
"bucket": "BUCKET-NAME",
"region": "REGION",
"role_arn": "IAM ROLE ARN"
}
}

headers = {"Content-Type": "application/json"}
r = requests.put(url, auth=self.awsauth, json=payload, headers=headers)
print(r.status_code)
print(r.text)

How does my 3 step code work?

Step -1 Connect Pipeline

Step -2 Snapshot

Step 3 -Restore

Source code-

flask
pandas
numpy
dash
requests_aws4auth
boto3
dash_core_components
dash_html_components

Note —

In case there are any errors it will be presented in the error section of the application . Certain mistakes like restoring and index from “X ElasticSearch” to “Y ElasticSearch” can cause error if there is already an index with the same name.
Or if you dont give a comma “,” between the index name.
If you face any other errors reach out to me.

But ensure you have done “Small Tweak before we begin” successfully.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store