Skip to content

Instantly share code, notes, and snippets.

View geronimo-iia's full-sized avatar
:octocat:

Jerome Guibert geronimo-iia

:octocat:
View GitHub Profile
@geronimo-iia
geronimo-iia / terminate-emr.sh
Last active May 30, 2017 13:40
find AWS EMR on tag name/value and terminate it
#!/bin/bash
# Remove termination protection and terminate cluster
# params:
# $1: clusterId cluster identifier
#
terminateCluster() {
clusterId=$1
aws emr modify-cluster-attributes --cluster-id ${clusterId} --no-termination-protected
aws emr terminate-clusters --cluster-ids ${clusterId}