AWS – Amazon Web Services
AWS (Amazon Web Services) – provides online business solutions by providing many services like EC2, S3 etc. With AWS we can have our own server to process our data, Storage and other services as per elastic IT infrastructure in a remote place. In simpler words you don’t have to buy any more physical device rather you can use this AWS services for your various purpose/Tasks.
Always we don’t have all the needed resources to run our project/service in our own server. Because we may need to run every server separately for excellent performance.
The Servers are like
- Application Server
- DB server
- Media streaming server
- Mail server
- Web server
- Storage Server
In this case we can go for Amazon web services, because they are providing all these services separately as per our need with considerable cost.
AWS can give us Computing power to process our data/task vastly, Storage space to store data secure/safe and access very easily with excellent speed.
Some of services from AWS are
- Cloud Front
- Simple DB
- 24/7 Availability
- Must need Net connection to access your data any where
EC2 (Elastic Compute Cloud):
It is a commercial Web service, provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. You can load any software of your choice by means of creating, launching, and terminating server instances. At any time you can change/upgrade all your server packages by taking it as image from amazon another instances.
S3 (Simple Storage Service):
It is an online storage Web Service from AWS. It 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.
Its Content delivery system from AWS, by which we can distribute contents with low latency, high speed to the end user. Amazon Cloud-front delivers your content using a global network of edge locations. Requests for your objects are automatically routed to the nearest edge location, so content is delivered with the best possible performance.
Before AWS we need to know what is Web services
Webservices means a system which is for machine to machine communication/interaction over a network. These software systems working based on various protocols like HTTP, SOAP and to build these systems by using XML and WSDL(There are many protocols and languages, API’s there to build this Web Services System). The below figure shows what’s happening actually behind the web services.
or in other words: Web services are modular software components wrapped inside a specific set of Internet communications protocols and that can be run over the Internet. These components can communicate with other components automatically without human intervention. They can be used on an Intranet inside a firewall, or out across the greater Internet. A Web service itself is a software module delivered over the Internet or an intranet via XML (eXtensible Markup Language) messaging. The software module can be built in a variety of ways, most notably, but not exclusively, using Java like languages.
In order for a computer or program to use a Web service, it needs be able to find the service description and then bind to it.
To accomplish this, there are three key roles in Web services architecture:
Together, they perform these three operations on a Web service: publish, find and bind.
Now if you are planned to launch a web site means you have to look into many areas or else you can blindly launch by some Hosting Provider’s.
First of all you need to decide that whether you need static or dynamic web page. If you chose static page like it’s about you are some contents to access through net that never going to change means choose static and give the controls to Hosting Provider’s. Or else if you want to dynamic pages then you have to decide whether you want to maintain everything your own or with some Hosting Provider.
However if you need greater performance then have all the needed tools your own or from web service providers like Amazon.
Here is the detailed info about EC2, S3 from amazon
Amazon EC2 Functionality
Amazon EC2 presents a true virtual computing environment, allowing you to use web service interfaces to launch instances with a variety of operating systems, load them with your custom application environment, manage your network’s access permissions, and run your image using as many or few systems as you desire.
To use Amazon EC2, you simply:
• Create an Amazon Machine Image (AMI) containing your applications, libraries, data and associated configuration settings. Or use pre-configured, template images to get up and running immediately.
• Upload the AMI into Amazon S3. Amazon EC2 provides tools that make storing the AMI simple. Amazon S3 provides a safe, reliable and fast repository to store your images.
• Use Amazon EC2 web service to configure security and network access.
• Choose which instance type(s) and operating system you want, then start, terminate, and monitor as many instances of your AMI as needed, using the web service APIs or the variety of management tools provided.
• Determine whether you want to run in multiple locations, utilize static IP endpoints, or attach persistent block storage to your instances.
• Pay only for the resources that you actually consume, like instance-hours or data transfer.
Amazon Simple Storage Service
Amazon S3 is intentionally built with a minimal feature set.
• Write, read, and delete objects containing from 1 byte to 5 gigabytes of data each. The number of objects you can store is unlimited.
• Each object is stored in a bucket and retrieved via a unique, developer-assigned key.
• A bucket can be located in the United States or in Europe. All objects within the bucket will be stored in the bucket’s location, but the objects can be accessed from anywhere.
• Authentication mechanisms are provided to ensure that data is kept secure from unauthorized access. Objects can be made private or public, and rights can be granted to specific users.
• Uses standards-based REST and SOAP interfaces designed to work with any Internet-development toolkit.
Now we are going to see how to use the AWS.
1. Create a account with amazon – https://www.amazon.com/ap/signin
2. Now you will be able to see the set of services listed there and now you have to choose which one you want. Like EC2, S3 or Cloud front it depends on your requirement
3. You can choose S3 with cloud front support to make your servers delivery performance much faster.
4. After created S3 account you can create any No. of buckets(storage pools) and you can name it as you want like images.yourdomain.com
5. Upload your images or files into S3 and now you will be able to access it anywhere easily and you are going to pay for only what server size you are using
6. And now you can integrate S3 with cloud front so that your performance will be much increasing than using just s3 service
And now here I will show you a example how to use amazon S3(Simple Storage Service)
Here is the example of how to copy/move all the files from your shared hosting server to amazon s3. Getting s3 access and how to use it tutors are so many there on net. Try to access those else it will be explained later.
Amazon S3 is really great service to store and retrieve large amount of data with less cost and great security. Shared hosting means most of us are using storage space of 2GB or 4 GB server and that too shared by so many people, so it’s not only for you. This is not applicable if you are using dedicated server only for you but still you can try out amazon s3 service.
Advantage of doing this task is really good. Here it is….
You have 20000 images or some documents that you always giving access to the people to check out. In such case if you are using shared hosting server surely your site will be dead slow to the people who all are accessing. If all the files are coming from some other server then your server only need to present the design then it will be great experience to surfing people. That other server is going to be amazon s3 of-course there are so many services are there for this one but amazon as3 is good. So let’s try it.
This tutorial is based on the s3 php class from http://undesigned.org.za/2007/10/22/amazon-s3-php-class, which is very easy to connect to S3 Service and access files/edit/delete/upload files to and from the s3. Download the class and follow the instructions and also i have uploaded a copy of my work which will be helpful for you to do it.
Here you need to provide your S3 access key and password to connect with your S3 instance, and then you can create any number of buckets(Storage pools) to store your data based on its categories(images, videos)
Check with the attached source in that you can create your own bucket Name while uploading a file based on its type.
More info and resources can be found here http://aws.amazon.com/
Filed Under: Uncategorized
About the Author: