amazon aws application

How to integrate Amazon Web Services to build an online application?

2 October, 2013

The idea is to create an online video repository. This application should be capable of uploading files to a storage server and displaying them once the process is completed. For this project I selected Amazon Web Services. I am able of supplying a fully functional and scalable application when integrating those services. Let me be clear, this post is systems integration oriented. I am not going to explain the coding of the application, this could be another post. My main goal here is to explain how I integrated AWS for this purpose: Route 53, EC2, SDK, EBS, CloudFront, S3, RDS, SQS, SNS and CloudWatch.

amazon aws application

This stack shows AWS infrastructure. There are many services available but I only used 10.

To start one must create an Amazon AWS account. We can then manage our services through the management console.

amazon aws stack

This diagram represents how I used Amazon services. Let me explain:

  • R53: Route 53 is a highly available and scalable Domain Name System (DNS) web service. I used R53 to point my domain name to the web server where my application was hosted; in my case an EC2 virtual server.
  • EC2: Elastic Computer Cloud allows us to rent virtual computers on which to run our own computer applications. I created an Ubuntu VPS. To integrate my PHP code I installed the SDK modules. I stored my code into the EBS volume.
  • SDK: Software Development Kit is a group of tools and features that expand our programming possibilities integrating Amazon AWS. At present there are kits for Android, iOS, Java, .NET, Python, Node.js, PHP and Ruby. We can call those PHP libraries from our code. I used it to communicate my code with SQS and SNS.
  • EBS: Elastic Block Store provides block level storage volumes for use with Amazon EC2 instances. Once created I pointed the EC2 instance folder /var/www to the EBS.
  • CloudFront: It is a web service for content delivery (CDN). It delivers our contents dynamic, static and streaming content in S3. Requests for our content are automatically routed to the nearest edge location, so content is delivered with the best possible performance.
  • S3: Simple Storage Service provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. We keep all our multimedia files here. This service works well together with CloudFront distributing the contents to edge locations.
  • RDS: Relational Database Service is a web service that makes it easy to set up, operate, and scale a relational database in the cloud. It gives you access to the capabilities of a familiar MySQL, Oracle or Microsoft SQL Server database engine. I placed here my MySQL database.
  • SQS: Simple Queue Service is a fast, reliable, scalable, fully managed queue service. We can use SQS to transmit any volume of data, at any level of throughput, without losing messages or requiring other services to be always available. In my case, I used it to send complete messages between file upload process and my PHP application. If we’d like to change our videos color or watermark them on upload process, we should be using this service as well, as it is a good way of warning Amazon services between them. We need to use the SDK for this purpose.
  • SNS: Simple Notification Service is a fully managed push messaging service. Besides pushing directly to mobile devices, SNS can also deliver notifications by SMS text message or email. From the PHP code I called SDK to send SNS emails when upload processes were finished.
  • CloudWatch: It provides monitoring for AWS cloud resources and the applications customers run on AWS. I used it to monitor resource utilization, application performance, metrics and costs message.

amazon aws application

This is how I integrated the software resources.

So at the end I got a PHP application that uploads video files into a repository. When files are fully uploaded, the systems sends a message to the code in order to publish the latest upload and an email is sent to me as log. File information is saved in a database.

Here I finish my explanation. If anyone doubts can leave a comment.


    Tags: , , , , , , , , ,


    1. Muy interesante como describes el uso y combinación de estos servicios…. pero quisiera saber si SNS es como tener un SMTP pero externo para gestionar el envio de correos sin perdidas?

    2. code used says:

      Quality articles or reviews is the main to interest the viewers to visit the site,
      that’s what this web site is providing.

    3. Hola tengo uan pregunta,

      si quiero desplegar una app en php pero utilizando EC2, EBL, RDS y VPC, como podria hacerlo.

    4. Hola, gracias por el interesante artículo, podrías indicar cuanto gastabas mensualmente con esta infraestructura? o dar un aproximado para tener una idea, muchas gracias por la atención.


    Leave a Comment