strangetimes
strangetimes

Reputation: 5183

Which AWS services to pick for the right architecture?

AWS seems a little daunting with too many overlapping services so I'm looking for some advice and direction.

We have a mobile app for which we've developed a sync server (i.e. user will sign-up, sync data kept on AWS). Currently we've setup an EC2 instance with a web server, Django end-points and a postgres server. However we need the following:

  1. Ensure the service is available from different regions of the world for faster access
  2. If that requires putting the postgres server outside of the EC2, what service do we need and how would replication work?
  3. We will have larger file attachments stored on S3 separately, but need to do this securely and encrypt the files
  4. Eventually we will host a web-app (i.e. an Angular 2 app) that would connect to the same database.

We also would need to do all this in the most economical way and then scale up as the load increases.

Please any guidance would be appreciated. I'm struggling with terminologies at the moment. We also setup an Amazon SSL Certificate however that requires an Elastic Load Balancer but we only have one EC2 instance. What do we do to get this all working securely?

Upvotes: 0

Views: 121

Answers (2)

Putnik
Putnik

Reputation: 6794

Your current environment isn't scalable (either load-responsive or to another region). If you need scalability then it should be re-arranged. It is difficult to provide you with details because the required environment depends on the applications architecture, however there are some suggestions:

  • DB: For better stability multi-AZ RDS setup for the DB is recommended. Benefit is RDS is fully managed service so you don't need to worry about replication, maintenance etc.
  • Web/app servers: you can deploy a copy in any region you want and connect to the same DB.
  • S3: you can enable crosss-region replication as well as encryption, but make sure it is used wisely (e.g. files are served to the client from bucket in closest region)
  • You can set up your own SSL on the server and it does not require ELB. However, you can use ELB with one webnode only.
  • I do NOT suggest to use Beanstalk because despite it really makes the first steps more easier you may have trouble trying to configure something non-standard in the future (unless you're very well familiar with EBT, of course).
  • To add efficiency you may want to add CDN (either AWS ot another vendor).

Make sure your environment configuration is really secure. You may need for your team someone who is familiar with AWS because every topic can be converted to a separate article.

Upvotes: 0

Ashan
Ashan

Reputation: 19728

Based on the information provided, I would recommend you to start with AWS Elastic Beanstalk, where it will manage autoscaling and loadbalancing while providing you with a DNS URL for external domain mapping.

  1. To ensure that the service is available from different regions for faster access, you can cache the static Angular App using Cloudfront. Then you will be able to add SSL Certificate to Cloudfront instead of ELB. If you plan to create multiple environments for different regions, you can use Route53 for geo based routing.
  2. To take Postgres server outside EC2, you can use AWS RDS and it supports synchronous replication with fail-over for Multi-AZ deployments and also Postgres in RDS also supports Cross Region Replication if you plan to setup multiple deployment environments in different regions. Also you can create Read Replicas to improve reading speeds which will be asynchronously replicated.
  3. You can encrypt the files in S3 using AES256 using Keys from KMS or from your client and I would recommend using Signed URLs with Cloudfront in front of S3 serving these files, so that clients can securely and directly access them improving the performance by getting advantage from distributed caching.
  4. You can host the Angular App in AWS S3 and Cache using Cloudfront for faster access. Another option is to cache the static asset path in Cloudfront so that subsequent requests for static assets will be served from Cloudfront.

FAQs from Amazon

Who should use AWS Elastic Beanstalk? Those who want to deploy and manage their applications within minutes in the AWS Cloud. You don’t need experience with cloud computing to get started. AWS Elastic Beanstalk supports Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker web applications.

Upvotes: 1

Related Questions