# Get the FQDN:
# Get the public IP of an instance using:
curl http://169.254.169.254/latest/meta-data/public-ipv4 && echo
# Get the instance host name
curl http://169.254.169.254/latest/meta-data/public-hostname && echo
yum install postfix -y
# Stop sendmail (installed on Amazon Linux by default)
# Switch MTA from sendmail to postfix
alternatives --set mta /usr/sbin/sendmail.postfix
Migration between regions
Elastic IP addresses are assigned to an account from the pool of addresses for a given region. As such, an Elastic IP address cannot be migrated between regions.
SSH public keys are only stored per region; AWS does not copy or synchronize the configured customer SSH keys between regions.
Copy your instance into another availability zone via right click on the AMI. And you don't need necessarily to stop the instance.
sudo yum install -y docker
sudo service docker start
# Add the ec2-user to the docker group so you can execute Docker commands without using sudo.
sudo usermod -a -G docker ec2-user
# Log out and log back in again to pick up the new docker group permissions.
# Verify that the ec2-user can run Docker commands without sudo.
Open ports in Security Groups not working?
Question: After I opened port 80 and shadowsocks port (both tcp and udp) in the associated Security Group, I found I either could not telnet my AWS on port 80 nor the shadowsocks server port.
This ref gave me a good hint. The reason why I couldn't telnet on port 80 was because I hadn't started apache yet. The reason why I couldn't telnet on my shadowsocks port was because in my config file I specified "127.0.0.1" (loopback) as server IP, which is wrong, and actually "0.0.0.0" (all ip) should be set instead.
No makeinfo in aws?
When compiling emacs on aws, yum found no candidate for makeinfo which is needed by emacs to generate info. This page told me that actually texinfo is another name for makeinfo. And yes, yum can find texinfo.