Yum install fails on Ubuntu EC2 instance
Solution 1:
Ubuntu is based on Debian, which uses apt not yum
which is what Red Hat uses. The Debian equivalent of:
yum update -y
Would be:
sudo apt-get update
As for your results when running apt-get install yum
Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1
403 Forbidden
Would seem to indicate you don't have access to that file (I get the same forbidden error myself).
apt-get update
should resolve your 404 errors, which are probably just caused by an unsynced or outdated package index.
I'm not entirely sure how Amazon operates their EC2 servers, but you should be able to install a LAMP stack withtaskel
see: What's the easiest way to set up a LAMP stack?
Solution 2:
To resolve the "forbidden" errors use:
sudo apt-get install yum
instead of apt-get install yum