Bootstrap actions run before Amazon EMR installs the applications that you specify when you create the cluster and before cluster nodes begin processing data. If you add nodes to a running cluster, bootstrap actions also run on those nodes in the same way. You can create custom bootstrap actions and specify them when you create your cluster.
https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-bootstrap.html
i need to patch the application (presto) after it is installed on all nodes. a few possible solutions are
- passwordless ssh, but for some security concern we disabled it.
- in the bootstrap schedule a cron job and check if the application is installed then act upon it.
- use ssm. but never really tried yet.
any idea?
[Update]
what actually has been done in our case is scheduling a background scripts (the &) in the bootstrap scripts which won't block bootstrap. inside the job, it will periodically check if the package is installed or not, if it is installed (e.g. rpm -q presto), then patch it.