1

Planning to host a PHP website with MySQL DB in Amazon Web Services, which AWS components should I choose? The website is just a dynamic website with a custom CMS, though a large amount of data are expected to be uploaded to the CMS.

I'm thinking to use Amazon EC2, with the following settings:

  • t2.medium Linux with 1024GB x 2 Magnetic EBS Volume
  • Data Transfer In & Out : 200 & 300 GB/Month

But I heard from others that I can use Amazon S3 to host websites, with the following settings:

  • Storage: 3000GB
  • PUT/COPY/POST/LIST Requests: 20000
  • GET and other Requests: 10000
  • Data Transfer In & Out : 200 & 300 GB/Month
  • CloudFront Monthly Volume: 1000 GB/month (avg. Object size 30KB)

What are the differences? Which should I choose?

Raptor
  • 991
  • 3
  • 16
  • 36
  • 1
    // You can host a static website on Amazon S3. On a static website, individual web pages include static content. They may also contain client-side scripts. By contrast, a dynamic website relies on server-side processing, including server-side scripts such as PHP, JSP, or ASP.NET. Amazon S3 does not support server-side scripting. // Ref: http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html – Pothi Kalimuthu May 03 '16 at 03:54
  • You may also learn how to host dynamic sites at http://aws.amazon.com/websites/ . I hope that clarifies. – Pothi Kalimuthu May 03 '16 at 03:56
  • Thanks for clarification. So, do I need to use S3 for file storage, or use EBS volume is enough? How does EBS-optimized differ from non-EBS-optimized? – Raptor May 03 '16 at 03:57
  • 1
    S3 works best for backups, imo. So, go with EBS. To learn the difference, please checkout http://aws.amazon.com/ebs/details/#piops – Pothi Kalimuthu May 03 '16 at 04:01
  • Thanks @Pothi. Can you put these in answer below, so that I can upvote & accept it ? – Raptor May 03 '16 at 04:07
  • 1
    Possible duplicate of [Can you help me with my capacity planning?](http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning) – user9517 May 03 '16 at 05:13

1 Answers1

2

You can host a static website on Amazon S3. On a static website, individual web pages include static content. They may also contain client-side scripts. By contrast, a dynamic website relies on server-side processing, including server-side scripts such as PHP, JSP, or ASP.NET. Amazon S3 does not support server-side scripting.

Ref: Hosting a Static Website on Amazon S3

You may also learn how to host dynamic sites at aws.amazon.com/websites.

S3 works best for backups, imo. So, go with EBS. To learn different EBS options, please checkout aws.amazon.com/ebs/details/#piops

Pothi Kalimuthu
  • 5,734
  • 2
  • 24
  • 37
  • Since the OP is planning to run MySQL, it might be appropriate to have a look at RDS, too: https://aws.amazon.com/rds/mysql/. With that one can have automated backups for the database etc. – Jukka May 03 '16 at 17:50