YugabyteDB, the distributed, PostgreSQL-compatible database, underlies YugabyteDB Aeon: a fully-managed, cloud-native “Database-as-a-Service” (DBaaS). Aeon lets you run clusters across AWS, Azure, and GCP without worrying about provisioning, availability, replication, or scaling. It offers multi-region deployments, fault-tolerance, built-in encryption, automated backups, and a 99.99% SLA.
With Aeon you get the power of a full-featured distributed SQL database, along with the convenience of managed infrastructure and a REST API / CLI for automation.
Why This Tip Matters
Sometimes UI clicks aren’t enough… maybe you’re writing automation scripts, running chaos tests, demonstrating resilience, or just want reproducible, programmable control over your cluster. With a small Bash script, you can:
● Start or stop a specific node
● Review exactly what request is sent
● Use dry-run mode for safe preview
● Optionally wait/poll until the operation completes
● Log actions for audit / CI pipelines
● Run on macOS or Linux with zero dependencies besides curl / jq / python
The Script:
aeon-node-op.sh:
#!/usr/bin/env bash
set -euo pipefail
# ===========================
# AEON NODE OPS TOOL
# ===========================
# ----- Color Helpers -----
if [[ -t 1 ]]; then
RED="\033[31m"; GREEN="\033[32m"; YELLOW="\033[33m"; BLUE="\033[34m"; BOLD="\033[1m"; NC="\033[0m"
else
RED=""; GREEN=""; YELLOW=""; BLUE=""; BOLD=""; NC=""
fi
# ----- Defaults -----
LOGFILE="${HOME}/.ybm/aeon-node-op.log"
VERBOSE_CURL="false"
WAIT_MODE="false"
WAIT_SECONDS="${YBM_WAIT_SECONDS:-30}" # default wait if --wait is used
usage() {
cat </dev/null || true
# ----- JSON pretty-printer -----
pretty_print_json() {
local body="$1"
if [[ -z "$body" ]]; then
echo "(empty body)"
return
fi
if command -v jq >/dev/null 2>&1 && echo "$body" | jq . >/dev/null 2>&1; then
echo "$body" | jq .
return
fi
if command -v python3 >/dev/null 2>&1 && echo "$body" | python3 -m json.tool >/dev/null 2>&1; then
echo "$body" | python3 -m json.tool
return
fi
echo "$body"
}
# ----- Main operation -----
perform_node_op() {
local payload
payload="$(cat <
● Aeon exposes a REST API … so automation (curl, scripts, CI) works great.
● The script builds the correct URL under /api/public/v1/…/node-ops
● Uses Authorization: Bearer <API_KEY> header… the same mechanism used by the official Aeon CLI (ybm) and docs require env vars prefixed YBM_.
● Supports both dry-run and real execution with full transparency.
● Wait mode is useful because Aeon node ops are asynchronous.
Final Thoughts
With this single script, you now have programmatic control to stop and start individual nodes in YugabyteDB Aeon… with transparency, safety, and automation baked in.
Whether you’re running chaos experiments, performing maintenance, or building automation tooling, this pattern gives you power and confidence.
Have Fun!
The calm before the storm. 😎 Here’s a sneak peek at the YugabyteDB booth before AWS re:Invent kicks off today in Las Vegas! Swing by Booth #1436 to chat with our experts, win cool prizes, and explore how to modernize your architecture for resilient, low-latency applications (we’re AWS Graviton Ready + PrivateLink Service Ready!). 🚀
📅 Dec 1–5
📍 Venetian Expo, Las Vegas