Skip to content

Instantly share code, notes, and snippets.

@koliadych
Created May 10, 2026 23:20
Show Gist options
  • Select an option

  • Save koliadych/18b8a930b4c5898d91aa7accd63bc35a to your computer and use it in GitHub Desktop.

Select an option

Save koliadych/18b8a930b4c5898d91aa7accd63bc35a to your computer and use it in GitHub Desktop.
fintechner readiness gate 1 + redeploy
#!/bin/bash
# fintechner — redeploy (slippage + equity fixes) AND enable termination
# protection in one shot. Idempotent.
set -euo pipefail
export AWS_PAGER=""
REGION=ap-northeast-1
INSTANCE_ID=i-089ad4a6b76132ba2
echo "=== 1. Enable EC2 termination protection ==="
aws --region "$REGION" ec2 modify-instance-attribute \
--instance-id "$INSTANCE_ID" \
--disable-api-termination "{\"Value\":true}"
TERM=$(aws --region "$REGION" ec2 describe-instance-attribute \
--instance-id "$INSTANCE_ID" --attribute disableApiTermination \
--query 'DisableApiTermination.Value' --output text)
echo " termination-protection: $TERM"
echo
echo "=== 2. Redeploy app (slippage + equity fixes) ==="
curl -sL "https://gist.githubusercontent.com/koliadych/870a61eb5fa33e80597854723e19cb15/raw/05-deploy-app.sh?$(date +%s)" | bash 2>&1 | tail -15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment