Learn AWS

Power unleashed.

It's 4pm on a Friday afternoon and you're about to publish your Android app to Google Play. You've worked on it as a solo developer for the past 5 months. You upload the APK and hit "Publish." You leave work just before 5pm to start your weekend.

It's 10:49am on Sunday morning and you're grabbing breakfast tacos with friends. Then you get a call from your boss. "The app doesn't work!" You log into Crashlytics on your phone and discover that the app was downloaded 200,000 times!

This is a good problem to have: the app had too many users. But do your API's scale to 200,000 users? 10,000 users? That's where Amazon Web Services (AWS) comes into play.

Most apps require a backend service of some sort. For example, when a user creates an account in your app, the user's name, email and password are sent to a RESTful API service, such as Firebase or AWS. If the database only contains 100 users, it can probably log all users in at the same time.

But what happens when 100,000 users try to sign in at the exact same time?

As Android Developers, we need to ensure that our API's will scale to millions of users.

Google vs. Amazon vs. Microsoft

Amazon isn't the only player on the field. Google and Microsoft also provide cloud services similar to AWS, and you can generally build the same app on any of these providers. AWS is by far the most popular among developers.

Lift-and-Shift

When computers were a new thing, system administrators spun up VM's -- or Virtual Machines -- in their company's server room. Then cloud came along and changed everything. Administrators could now take the same VM they had at the office, and convert it to the cloud. Smart administrators placed a manager on top of VM's, such as Kubernetes.

Then serverless happened. With serverless, developers could hit an API endpoint -- such as https://api.example.com/v1/user/837 -- and instantly get back JSON. The API call to user 837 took 100ms, a fraction of a second. This means that the server only needs to be awake for less than 1 second.

If you only need 100ms, it makes sense to have the serverless backend constantly start and stop servers. This is the heart of serverless.