aws userdata + /etc/hosts entries code example Example: set hostname on command line ec2 sudo hostnamectl set-hostname yourhostname