I typically use default Amazon Linux 2 AMI for my applications. It qualifies for free 12 month trial and is well adjusted for their hardware. I've been using several Amazon Linux instances since 2015 and they run for years without a glitch! So I can recommend them with a clear conscience:
Install GCC
sudo yum install gcc-c++
Install OpenSSL
sudo yum install openssl-devel
Install MySQL
sudo yum install mariadb-server
sudo yum install mariadb-devel
sudo systemctl start mariadb
sudo systemctl enable mariadb
# On production:
sudo mysql_secure_installation
# Some basic configuration tweaks:
sudo vi /etc/my.cnf
# Add in the [mysqld] section:
wait_timeout=31536000 # (to prevent disconnecting after inactivity)
max_allowed_packet=16M # (to allow bigger packets between app and server)
sudo systemctl restart mariadb
(In case you were wondering, My and Maria are Monty's children.)
Node++ include and library paths
Edit $NPP_DIR/src/m
Install Certbot
Provides free Let's Encrypt certificates
sudo amazon-linux-extras install epel
sudo yum install certbot
Get a Let's Encrypt certificate via Certbot
certbot certonly --standalone -d example.com --debug
Renew a Let's Encrypt certificate
USE_PYTHON_3=1 certbot renew --debug --no-bootstrap --no-self-upgrade
Install Heirloom mailx
Provides simple mail
commands for sending and reading emails (MUA = Mail User Agent)
sudo yum install mailx
Enable TLS for outgoing emails
Messages from the server will look more legitimate for the clients