Running Commands on Your Linux Instance at Launch – Amazon Elastic Compute Cloud https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html