I'm new to the db and cloud world.
So I'm writing an app that needs to query a very simple data (open/closed status of some location).
I thought of two options:
1) An ec2 micro instance running LAMP + MongoDB, and I wrote a php page that will query the db, format it and returns it.
2) i also looked at Amazon SimpleDB, the idea is by using it I don't need to run an ec2 instance 24/7, which can save me money. But where should I put the php page that query the SimpleDB then? It doesn't make sense to put it in an ec2 instance as the idea is to save money by not running it 24/7. I also learnt that I shouldn't connect to the database from my app cause that will expose my username/password of the database.
The micro instances are a real pain whenever you want to do something with them. They run out of cpu and become unreachable for a couple of minutes whenever you have a high load.
SimpleDB sounds more like a better choice for you if you don't want to run your own database. If you only have a simple PHP page with queries for a database, you could put it on a number of cheap PHP web hosting sites.
As a side note: if you are going to install MongoDB on a micro instance, make sure you run it on a 64-bit system. I had a lot of strange errors coming from MongoDB (high CPU usage when the process should be idle) when using it on a 32-bit micro instance.