First of all, you need EC2 service so as to have a virtual machine, where you'll install Apache, PHP and your web Application.
Then you also want a database server and data repository for the media files. The recommended manner is precisely what you suggest: RDS for MySQL and CloudFront as the file repository.
Initially, none of the above services (RDS, CloudFront and even EBS) was offered. Developers don't have any way to use a MySQL database, because though it was installed in an EC2 instance, the instance isn't guaranteed to stay up and running and if the instance is lost, the data is lost. For this reason, EBS was introduced. It created mounted storage with absolute persistence that you could access from the EC2 instance. Theoretically, you'll install MySQL there and use it to store the flash files. If you only need to serve files through the HTTP protocol, there's no drawback using EBS.
CloudFront, however, has some advantages:
- Users are automatically routed to the closest edge location a low latency and high-performance delivery of your content.
- You can also use it to stream content through the RTMP protocol.
- You don't have to worry about the size of the storage. With EBS you create storage with a particular size. This could be a problem if you later find out that you need more storage. With CloudFront, the files are put in in S3 and you do not need to worry concerning their size.
- You do not waste web server capacity. If you utilize EBS, the files will be served by the server in EC2.
You could also use S3, but you wouldn't able to use the RTMP protocol and you would need to manually create links to your files. Also, it wouldn't be possible to use your domain name for the files.
RDS additionally has some benefits over installing MySQL in EC2, EBS:
- automated database backups
- You can monitor your information with Amazon CloudWatch which is a free service