How to run commands at machine startup?

OS: Amazon Linux
Add your commands in /etc/rc.local