Kai Kuhlmann
Kai Kuhlmann

Reputation: 182

Which AWS services for mobile app backend?

I'm trying to figure out what AWS services I need for the mobile application I'm working on with my startup. The application we're working on should go into the app-/play-store later this year, so we need a "best-practice" solution for our case. It must be high scaleable so if there are thousands of requests to the server it should remain stable and fast. Also we maybe want to deploy a website on it.

Actually we are using Uberspace (link) servers with an Node.js application and MongoDB running on it. Everything works fine, but for the release version we want to go with AWS. What we need is something we can run Node.js / MongoDB (or something similar to MongoDB) on and something to store images like profile pictures that can be requested by the user.

I have already read some informations about AWS on their website but that didn't help a lot. There are so many services and we don't know which of these fit our needs perfectly.

A friend told me to just use AWS EC2 for the Node.js server + MongoDB and S3 to store images, but on some websites I have read that it is better to use this architecture:

We would be glad if there is someone who can share his/her knowledge with us!

Upvotes: 2

Views: 2248

Answers (2)

Putnik
Putnik

Reputation: 6804

  • To run code: you can use lambda, but be careful: the benefit you don't have to worry about server, the downside is lambda sometimes unreasonably slow. If you need it really fast then you need it on EC2 with auto-scaling. If you tune it up properly it works like a charm.
  • To store data: DynamoDB if you want it really fast (single digits milliseconds regardless of load and DB size) and according to best practices. It REQUIRES proper schema or will cost you a fortune, otherwise use MongoDB on EC2.
  • If you need RDBMS then RDS (benefits: scalability, availability, no headache with maintenance)
  • Cache: they have both Redis and memcached.
  • S3: to store static assets.
  • I do not suggest CloudFront, there are another CDN on market with better price/possibilities.
  • API gateway: yes, if you have an API.
  • Depending on your app, you may need SQS.
  • Cognito is a good service if you want to authenticate your users at using google/fb/etc.
  • CloudWatch: if you're metric-addict then it's not for you, perhaps standalone EC2 will be better. But, for most people CloudWatch is abcolutely OK.
  • Create all necessary alarms (CPU overload etc).
  • You should use roles to allow access to your S3/DB from lambda/AWS.
  • You should not use the root account but create a separate user instead.
  • Create billing alarm: you'll know if you're going to break budget.
  • Create lambda functions to backup your EBS volumes (and whatever else you may need to backup). There's no problem if backup starts a second later, so Lambda is ok here.
  • Run Trusted Adviser now and then.
  • it'd be better for you to set it up using CloudFormation stack: you'll be able to deploy the same infrastructure with ease in another region if/when needed, also it's relatively easier to manage Infrastructure-as-a-code than when it built manually.

Upvotes: 4

ainsausti
ainsausti

Reputation: 715

If you want a very high scalable application, you may be need to use a serverless architecture with AWS lambda. There is a framework called serverless that helps you to manage and organize all your lambda function and put them behind AWS Gateway. For the storage you can use AWS EC2 and install MongoDB or you can go with AWS DynamODB as your NoSql storage. If you want a frontend, both web and mobile, you may be want to visit the react native approach.

I hope I've been helpful.

Upvotes: 3

Related Questions