Amazon Linux doesn’t offer the Gimp Tool Kit (GTK+) so if you want to run Firefox on an Amazon Linux system, say for Selenium testing, you are left having to compile the system yourself. Luckily you have found this post. Create the script below, run it as root and it will build all the components needed for GTK+ and its dependencies for Firefox to run just fine on the system.
chmod 755 ./gtk-firefox
After you have built the packages, add the /usr/local/bin to your path by updating your .bashrc file.
Here is the gtk-firefox file for your pleasure.
If you are running OSX Mountain Lion or above and cannot get Firefox to run via the SSH -X command, make sure you have XQuartz installed as Apple removed X11 by default.
Edited to make Firefox latest release more reliable. Updated with Gist.
Edit 11/21/2012: Added dbus-glib dependency to gist. Added notes about running on OSX