I have created ubuntu 10.04 ec2 image and now I need to install tomcat apache and jdk6 on my instance but whenever I use the command sudo apt-get install sun-java6-jdk
Another option is to add their official repository to apt - this will provide you up to date AWS tools:
sudo apt-add-repository ppa:awstools-dev/awstools
sudo apt-get update
sudo apt-get install ec2-api-tools -y
This is extremely useful for farther releases and and for up to date official bug fixes etc. just by running the usual
sudo apt-get update
sudo apt-get upgrade -y