How to install FFMPEG and FFServer on Raspberry Pi

How to install FFMPEG on EC2 running Amazon Linux?

Recently, I needed to install ffmpeg on my EC2 instance and I struggled quite a bit to set it up. The issue was that my EC2 instance is running Amazon Linux based AMI which is probably based on some version of CentOS.