access logs ec2 instance code example
Example 1: how to keep name for ec2 instance running
sudo hostnamectl set-hostname webserver.localdomain
Example 2: keep ec2 instance connected on command line
echo 'ClientAliveInterval 60' | sudo tee --append /etc/ssh/sshd_config
sudo service sshd restart