Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Today I setup an EC2 instance. I'm wondering what is the typical architecture on amazon cloud for web applications. I think its something like this but I'm missing something:

- EC2 instance for Webserver (apache/nginx) and PHP
- S3 for storage (videos, images...)
- ?? for MongoDB, MySQL or anything else

I'm not sure how these things work. For example, how to setup simple image uploading service where every picture is uploaded through PHP and then saved on S3. Later, when somebody visits a link its displayed from S3.

share|improve this question

closed as not constructive by EEAA, larsks, Michael Hampton, Scott Pack, Magellan Nov 12 '12 at 4:45

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Well it is archived in S3, and served after retrieval from it to EBS block volume. Or to Cloud Front. –  Andrew Smith Aug 15 '12 at 21:44
    
There is no such thing as a "typical structure". –  EEAA Aug 15 '12 at 21:45
    
@AndrewSmith I'm sorry but this doesn't really help me as I'm not expert and does not understand what are you saying. –  Meznaric Aug 15 '12 at 21:47
    
@ErikA Ok, Than what would you recommend? –  Meznaric Aug 15 '12 at 21:48

2 Answers 2

up vote 0 down vote accepted

You have a fairly simple architecture. For this to work,

The PHP SDK should help you with saving pictures to S3. Just make sure you setup proper S3 bucket policies (read/write and update) so that your S3 is secure.

Have you setup an Elastic IP and domain on Route 53?

Couple of caveats on AWS since you seem new,

  • Look at Autoscaling and ELB for redundancy and scalability.
  • Do not store anything from your application that is important locally unless it's an EBS volume
  • Always go for a lower capacity instance and increase capacity as needed unless you are sure that instance type you need. This will save you costs.
  • Look at reserved instances if you are sure of the instance type and longevity of your applicaiton. Once you buy a reserved instance you cannot cancel it or change the instance type until your term is over.

I'd strongly recommend you read a lot about these technologies and then implement them. Amazon documentation is excellent.

share|improve this answer

You never want to run a single EC2 instance in a production environment. They aren't durable and can permanently go offline at any time (taking all the data stored on them with it). Use a minimum of two application server instances behind a load balancer.

Since you're new to this, I'd recommend that you read up on the documentation for Amazon Elastic Beanstalk. It's a PaaS-like configuration framework that makes it easier to get a properly designed AWS infrastructure online.

share|improve this answer

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