I need a backend server for my mobile app - I need to be able to write server side logic so I don't need to download the entire database. I'm using JavaScript + HTML5 for mobile apps.
Are Amazon EC2 or Google App Engine able to do that? Are there any other options?
There's no such thing as Adobe EC2, unless you're referring to the Adobe media server you can set up on EC2. But I'm assuming you're simply referring to the Amazon Web Services EC2 cloud computing service. In which case: yes, you can run a backend server for your mobile app on EC2 (and Google App Engine, too). All you have to do is write a web service that accepts requests from your mobile app, queries the database and applies whatever logic you need it to apply, and send back the data to your mobile app. But it sounds like you may want to read up on web services and cloud computing first, or this will be a rather daunting task :)
If you're not expecting too many users then simply putting a PHP script or something on a "traditional" shared server with your web hosting provider may be much more worthwhile than running a dedicated EC2 instance for your app, though.
Both Amazon Web Services (AWS) and Google App Engine (GAE) can be used for free initially, AWS via the AWS free tier and GAE simply by default. Whatever your backend service, just keep it as light as possible initially as on cloud providers the larger your computations the higher the cost (or the quicker to go over your free usage limits). I would consider the RackSpace cloud (RS) too. Here RS compare their services to AWS.
One important distinction. In AWS and RS you have control over your instance because you "own" (pay for) and control a full instance. On the other hand GAE is a cloud application platform and therefore, as in the case of Heroku, you have to write your code to work with such application platform. There are several pros & cons to the cloud application platform.
For instance, as an advantage of GAE you get most DevOps for free. E.g. to update your application in GAE it's extremely easy, whereas on AWS you would have to write your own deployment script. On the other hand (as a problem I ran into), on GAE you cannot have your own DB server on the same instance since you do not have full control; you would have to go for a proprietary solution as Google Cloud SQL or GAE's High Replication Datastore.
Daan's answer is correct regarding the two providers named explicitly (+1).
If you want to save yourself some hassle and/or get some guidance along the way, you may want to have a look into one of the dedicated Platform as a service (PaaS) providers targeting the mobile app backend segment specifically. There are probably a dozen more in the meantime, but from the top of my head I recall these three right now (all commercial, but usually some kind of free tier to get you started and/or eternally even for development purposes) - in no particular order:
The main benefit you'll achieve via this approach is dealing with a platform rather than the infrastructure itself, which abstracts away many (if not all) topics requiring dedicated system administration skills (it usually doesn't hurt to have that knowledge on the team regardless, see DevOps).
The main drawback to look out for is avoiding vendor lock in eventually, i.e. depending on your needs you might want to be able to migrate your app backend to another provider, which is currently not always simple, if at all possible. On the other hand this is likely not your concern right now, if you just want to get started fast and/or develop a prototype for example.
Most of these will use some Infrastructure as a Service (IaaS) provider like AWS or Joyent as their backend in turn btw.
Good luck!
Full disclosure: I work for Google on AppEngine, but I'm trying to be impartial. I should also note (as always) that I'm giving my own opinions, not the company's.
In theory, there's no reason why you really need to use a backend service provider of any kind. You can wire up a server with a static IP address and a domain name anywhere you want. In practice, nobody wants to deal with the hassle of doing all this stuff yourself.
On the other hand, you have another question to answer: what does hassle elimination cost? Experience has taught me that the cost is usually lack of control. To make the least amount of hassle possible, you have to save people from making choices. Having fewer choices means you have less control.
So the question to answer is: How much control do you need, and how much hassle are you willing to deal with?
If you need a high level of control, and are willing to deal with a high amount of hassle, you probably want the "box with a static IP" option.
AWS reduces some of the hassle of getting boxen set up, but reduces your control over the hardware your software runs in. This is almost certainly acceptable to you unless you have very odd hardware requirements.
Google App Engine removes the hassle of having to configure software, but reduces your control over the software stack your software will run with. Do you have any special software requirements? For example, do you specifically need to run on a certain version of Linux? Do you need to have a special requirement to use say Redis rather than just a memcache/database combination? If not, then this is probably acceptable to you as well.
Most of the Backend as a Service providers remove the hassle of writing a backend altogether, but at the cost of removing your control over the backend. Are the supported authentication methods good enough for you? Does the backend allow you to access your data exactly as you need? If so, this is probably acceptable to you.
Now, here's where my impartiality ends. Personally, I feel that App Engine is at a sweet spot. It gives you enough control without making you manage every detail of your application. If you need more control, I'd suggest looking at AWS. If you want your backend written for you automagically and can handle having less control, I'd suggest looking at BaaS.
Steffan's answer hits the core points, and there are some additional benefits to using a backend-as-a-service (BaaS) platform beyond simply having the infrastructure / DevOps side of things handled for you. (Full disclosure: I am an engineer at Kinvey, a backend-as-a-service provider).
Many of these services provide RESTful APIs to access your data directly. Rather than spending time to roll your own (and reinvent the wheel yet again), you typically get your own data API baked in and ready to go.
BaaS providers typically offer code libraries to simplify connecting to your API.
It's often more than just application data. For example, at Kinvey, we provide large file (blob) storage as well. If you have any images, videos, etc, you can store them with zero setup.
Some providers also offer analytics on your API usage - another wheel that you don't need to reinvent
Partnerships with other providers: for example, Kinvey provides push notifications via Urban Airship
All together, it probably makes sense to take a look at BaaS to see if it can fit your needs.
As Steffen and Dave have said, one of the Backend as a Service providers might be up your alley. Most if not all of these platforms have fairly robust query systems so you shouldn't need to worry about sifting through extraneous information from the DB. I think Parse specifically walks through a use case exactly like the one you mentioned about pulling only x number of top scores from the DB.
If you absolutely need server-side code, StackMob allows for custom code hosting and I believe Kinvey is in beta for doing the same. I think StackMob only supports Java and Clojure for server code though, if that matters.
There's always a trade off between flexibility and ease of use, but depending on how much control you need over your data, these services can save you a lot of time without really degrading your app's functionality.