Skip to content

Instantly share code, notes, and snippets.

@Veetaha
Last active October 29, 2024 13:16
Show Gist options
  • Save Veetaha/6097c66db2f6b158a6395f42beec1454 to your computer and use it in GitHub Desktop.
Save Veetaha/6097c66db2f6b158a6395f42beec1454 to your computer and use it in GitHub Desktop.
Scripts to clean up AWS resources deployed by Elastio. Use `sh` version if you are on a UNIX-like OS. Use the `ps1` version if you are on Windows.
# Install aws-gc
Invoke-WebRequest "https://dl.cloudsmith.io/public/elastio/public/raw/versions/latest/aws-gc_x86_64-pc-windows-msvc.zip" -OutFile "aws-gc.zip";
Expand-Archive -Force "aws-gc.zip";
Move-Item -Force "./aws-gc/aws-gc.exe" "./aws-gc.exe";
Remove-Item -Force "./aws-gc", "./aws-gc.zip";
# Discover Elastio resources and run the deletion. You'll need to type "yes" to confirm the deletion
./aws-gc.exe destroy --tag elastio:resource=true --id-pattern elastio
# Install aws-gc
curl -fLS https://dl.cloudsmith.io/public/elastio/public/raw/versions/latest/aws-gc_x86_64-unknown-linux-musl.tar.xz | sudo tar -xJf - -C /usr/local/bin
# Discover Elastio resources and run the deletion. You'll need to type "yes" to confirm the deletion
aws-gc destroy --tag elastio:resource=true --id-pattern elastio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment