0

I am designing an AWS architecture for hosting a website that sells online courses and merchandise products. For the purpose, I am planning to use the following architecture design:

  • 1 VPC
    • 1 Application (RDS database + PHP web application)
      • Under Application, there can be 1 EC2 instance, 1 RDS database
      • S3 bucket
        • To store all static files, images, stylesheets, javascript files etc.
        • To upload all dynamic files, images, etc. (to be uploaded by users & website admin)
        • A CDN domain (e.g. cdn.mydomain.com) will be created to serve all files from S3 bucket.
    • 1 CloudFront (for content hosting & delivery)
    • AWS Router 53 (for domain & subdomain)

As per my knowledge and understanding, CloudFront should be used to deliver the content from S3 bucket that's why I am thinking of this.

Question #1: Should I create a VPC and encapsulate all AWS services/resources under it like S3, Application, RDS Database?

Question #2: Should CloudFront be used for the purpose?

Question #3: Is there any better approach for achieving this?

Note: Please note that I am trying to utilize the resources under Free Tier as much as possible to avoid cost as this is an initial phase of the website and I will be selling my courses through this as of now. And, there will be videos for each session/lecture where each video can be of 2GB or more in size and for 1 course there can be 40-50 videos that students can access only after making a purchase. Also, I would love to know if I should add anything that I missed.

Happy to hear experts' advise/suggestions on this.

1
  • In addition to this, I will be using Elastic Beanstalk which I find quite useful for easy configuration. Feb 18 at 9:39

1 Answer 1

1

Question #1: Should I create a VPC and encapsulate all AWS services/resources under it like S3, Application, RDS Database?

If you use Elastic Beanstalk, you shouldn't have to worry too much about this, since it is a PaaS service (platform-as-a-service) that would take care of it for you. Be careful about the free tier limits and platform locking.

Question #2: Should CloudFront be used for the purpose?

You don't need CloudFront to serve your S3 content. It will be too pricey for what you want to achieve. Every object in your S3 bucket has a unique URL that you can use directly. Please read : https://stackoverflow.com/questions/3327425/when-to-use-amazon-cloudfront-or-s3

  • S3 are not VPC bound by default. You can decide to do it for security reasons but it's optional.

Question #3: Is there any better approach for achieving this?

There are many different approaches available. It depends on your requirements : number of users, proximity of users, High Availability requirements, size of the content served, etc. You can read about System Design to get more information about this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.