Skip to content

Instantly share code, notes, and snippets.

View andresfelipe9619's full-sized avatar
🏡
Working from home

Andres Suarez andresfelipe9619

🏡
Working from home
View GitHub Profile
@andresfelipe9619
andresfelipe9619 / elastic-ip-assigner.sh
Created October 5, 2025 14:47
This Bash script automates the process of assigning a stable Elastic IP (EIP) to an AWS EC2 instance. It ensures that a specific instance always retains the same public IP, even after restarts or redeployments.
#!/usr/bin/env bash
set -euo pipefail
# === config (adjust if needed) ===
REGION=us-east-1
INSTANCE_ID=i-xxxxxxx
EIP_TAG_KEY=Name
EIP_TAG_VALUE=strapi
# =================================