Answers: <p><strong>Question #1: Should I create a VPC and encapsulate all AWS services/resources under it like S3, Application, RDS Database?</strong></p>
  <p>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.</p>
  <p><strong>Question #2: Should CloudFront be used for the purpose?</strong></p>
  <p>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 : <a href="https://stackoverflow.com/questions/3327425/when-to-use-amazon-cloudfront-or-s3">https://stackoverflow.com/questions/3327425/when-to-use-amazon-cloudfront-or-s3</a></p>
  <ul>
  <li>S3 are not VPC bound by default. You can decide to do it for security reasons but it's optional.</li>
  </ul>
  <p><strong>Question #3: Is there any better approach for achieving this?</strong></p>
  <p>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 <a href="https://en.wikipedia.org/wiki/Systems_design" rel="nofollow noreferrer">System Design</a> to get more information about this.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-02-21T13:56:32.727Z
Answers: 2024-02-21T14:15:51.913Z
Answers: 2024-02-21T14:15:51.913Z
Answers: alban boitier
Body: <p>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:</p>
  <ul>
  <li>1 VPC
  <ul>
  <li>1 Application (RDS database + PHP web application)
  <ul>
  <li>Under Application, there can be 1 EC2 instance, 1 RDS database</li>
  <li>S3 bucket
  <ul>
  <li>To store all static files, images, stylesheets, javascript files etc.</li>
  <li>To upload all dynamic files, images, etc. (to be uploaded by users &amp; website admin)</li>
  <li>A CDN domain (e.g. cdn.mydomain.com) will be created to serve all files from S3 bucket.</li>
  </ul>
  </li>
  </ul>
  </li>
  <li>1 CloudFront (for content hosting &amp; delivery)</li>
  <li>AWS Router 53 (for domain &amp; subdomain)</li>
  </ul>
  </li>
  </ul>
  <p>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.</p>
  <p><strong>Question #1</strong>: Should I create a VPC and encapsulate all AWS services/resources under it like S3, Application, RDS Database?</p>
  <p><strong>Question #2</strong>: Should CloudFront be used for the purpose?</p>
  <p><strong>Question #3</strong>: Is there any better approach for achieving this?</p>
  <p><strong>Note</strong>: <em>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.</em>
  <em>Also, I would love to know if I should add anything that I missed.</em></p>
  <p>Happy to hear experts' advise/suggestions on this.</p>
  
Comments: CC BY-SA 4.0
Comments: 2024-02-18T09:39:39.523Z
Comments: In addition to this, I will be using Elastic Beanstalk which I find quite useful for easy configuration.
Comments: meDeepakJain
Tags: <amazon-web-services><amazon-ec2><amazon-s3><architecture><amazon-cloudfront>
Title: How to design AWS infrastructure for my online course selling website?
UserDisplayName: meDeepakJain
ThreadText: # How to design AWS infrastructure for my online course selling website?
  
  (Asked by: username_0 on 2024-02-18)
  
  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.
  
  **Tags:** amazon-web-services, amazon-ec2, amazon-s3, architecture, amazon-cloudfront
  
  > **Comments:**
  > **username_0**: In addition to this, I will be using Elastic Beanstalk which I find quite useful for easy configuration.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-21. Score: 1 | Accepted answer
  
  **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](https://en.wikipedia.org/wiki/Systems_design) to get more information about this.
  
  
  ---
  
  