LoginSignup
0
0

More than 5 years have passed since last update.

EMRのBootstrapActionをMasterノードだけ実行する #aws #emr

Posted at

EC2インスタンスのユーザデータに持っている isMaster を利用する。

#!/bin/bash -ex

if [ $(curl -s http://169.254.169.254/latest/user-data/ | jq .isMaster) == "true" ]; then
  echo Masterノードのみ実行する処理...
fi
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0