Closed hiddenillusion closed 3 years ago
There is currently an alternate method to specify a userdata script that is provided, via an env var. From the code comments on utils.ReadStartupScript
:
Users can either write their own script to install custom packages,
or use one of the provided ones. To use your own script, export a
STARTUP_SCRIPT environment variable with the absolute path to it:
"user@terminal:~$ export STARTUP_SCRIPT='absolute/path/script.sh'"
That said, I agree that being able to pass in an argument makes more sense, but the above might suit you in the meantime.
GetOrCreateAnalysisVM()
in the AWS ec2.py lib is currently hard coded to install the contents ofstartup_script
.It would be more flexible if this was determined via an argument since we may not want to install any supplemental packages (right now you can only remove the contents of
scripts/startup.sh
to satisfy this)