This repository has a python program that acts as a demo for showcasing Read Replica feature of InfluxDB within AWS TimeSteam.
Steps to run: Video tutorial
- Have an AWS Account and setup TimeSeries for INfluxDB - Cluster with read replica. Make sure it has an IP address
- Login to InfluxDB via UI for both primary and replica instance and get the URL for the same. Create an API Token and Bucket and note the URL and Org name.
- Download & Install InfluxDB v3 Python client SDK
pip install influxdb3-python
- Download/Clone this repo and edit the confoguration
# Configuration AWS TimeStream for InfluxDB
PRIMARY_URL = "" # Primary InfluxDB Instance REPLICA_URL = "" # InfluxDB Replica Instance INFLUXDB_TOKEN = "" # Same API Token for both primary and replica ORG = "" # Same organization name for both primary and replica BUCKET = "" # Same bucket name for both primary and replica
5. Run the program `python aws-timestream-influxdb-v2-demo.py` and see the output in console logs
6. Open UI and navigate to Data Explorer for both Primary and Replica instances of InfluxDB and notice the same data being replicated.