Posts Tagged ‘ec2’

AWS Economics Center Releases New Cost Comparison Calculator

Sunday, December 13th, 2009 by François

Amazon Web Services Logo

Amazon Web Services Economics Center provides access to information, tools, and resources comparing the costs of Amazon Web Services (AWS) with alternative IT infrastructure.

The tools AWS have provided really help quantify the cost/benefit of cloud computing as you can model certain usage patters and determine the likely cost/benefit of each approach to meeting these infrastructure requirements.

The latest of these tools, Amazon’s EC2 Cost Comparison Calculator, is perhaps the most informative as it helps determine the annual costs of EC2 vs. co-locaton vs. on-site hardware.

It is easy to use and can be modified to reflect your specific requirements. You can download the spreadsheet here.

The AWS Simple Monthly Calculator which seems to have been around for ages includes all of the services and regions on offer but due to the fact it is geared towards a monthly estimate it is less useful for analysis purposes. That said, the customer samples are interesting, and cover the primary scenarios we would suggest using AWS for.

The point is even before you speak to a specialist I would suggest playing around with these tools.

They won’t make a decision for you but they will indicate whether or not you should be investigating AWS further.

Using Amazon Web Services To Deliver Online Video

Saturday, April 25th, 2009 by François

AWS_LOGO_RGB_300pxAfter much research and testing we have settled on two approaches for delivering video content from Amazon Web Services (AWS).

Each approach uses a different delivery protocol.

By progressive download (HTTP) using CloudFront or S3

HTTP delivery sends the entire video file upon request meaning the video arrives with the same quality at which it was encoded. However, the user will receive it only as fast as their network connection will allow.

You can get around this to a certain extent with PHP-streaming or pseudo-streaming but this still relies on a traditional web server rather than a streaming server.

By steaming (RTMP) using Wowza Media Server for EC2

When a file is streamed via a media server such as Wowza Media Server a measured stream of data is delivered to users as the video plays. Priority is given to timely delivery over aesthetic quality ensuring that the data stream continues uninterrupted, even if it means reducing quality.

Excellent or poor performance can be achieved with either delivery protocol. And in most cases, the user cannot tell whether the video they’re watching is downloading or streaming.

Why set up both on AWS?

HTTP:

  • is what S3 and CloudFront are all about
  • is suitable for videos of a short duration
  • is suitable for delivering high-bit rate encodings
  • is suitable if end-users need/are allowed to keep a copy of the video on their own computers

RTMP:

  • we had the in-house technical resources to configure and set this up
  • we needed a suitable delivery protocol for longer form content
  • we wanted to enable interactive functionaliy between the playback client and media server
  • we wanted greater statistical granularity
  • we wanted greater control over access rights to videos

We would never stick out our neck out and say that one delivery protocol was better than the other.

But we will say that they each have their own pro’s and con’s and having the option to choose between the two was critical for us.

There is no doubt that HTTP is a doddle to set-up.

Wowza for EC2 is amazingly well supported via the Wowza forums but it is still a bit of a challenge.

So our advice would be if your looking for the best of both worlds definitely look into the approaches outlined above but if you’re looking for a quick and easy way to offload your video delivery (or any other heavy assets) stick to S3/CloudFront you won’t be disappointed.

Elastic Cloud Compute (EC2) Reserved Instances Now Available In Europe

Sunday, April 19th, 2009 by François

AWS_LOGO_RGB_300pxAmazon Web Services (AWS) recently announced that Reserved Instances for Elastic Cloud Compute (EC2) are now available in Europe.

For those not in the know EC2 is a virtual computing environment meaning you can customise and launch virtual servers how and when you want. You pay for this by the hour and there are no long-term commitments.

Those of you who regularly have to deal with dedicated server providers will no doubt appreciate this infrastructure-as-a-service model.

With the announcement of reserved instances you now have the option to make a one-time payment for each instance you want to reserve and in return you receive a significant discount on the hourly usage charge for that instance.

For example, we will be paying our $325 up front-fee meaning our small instance should cost around about 20-30% less if we run our instance, as we expect to, full-time.

In a nutshell this means that those of you out there with predictable usage patterns should be able to reduce your operational costs of running an EC2 instance.

As usual Europe was a little behind the US in terms of roll-out and so far only Linux/UNIX-based instances are available.

The only things that have made us think twice about signing up for a reserved instance are:

  • the up-front fee is non-refundable and you are locked-in to the computational pricing at the time you reserve your instance.
  • the AWS customer service agreement states that Amazon “may terminate the Reserved Instance Pricing program at any time.”

Having considered the above we can’t see  them terminating the program any time soon but we can see them reducing their EC2 pricing in Europe over time.

That’s why we’ve decided to reserve an instance for 1 year only.

FTP error 500 OOPS: vsf_sysutil_recv_peek

Wednesday, March 18th, 2009 by The BCM Team

If your vsftpd server running CentOS 5 (on a small ec2 instance) is giving you a “ftp error 500 OOPS: vsf_sysutil_recv_peek” error, try loading capability mode woth the following command:


modprobe capability

JW Player, S3, Wowza and “Stream not found” error for files that have spaces in filename

Monday, February 23rd, 2009 by The BCM Team

When working on an application that streams videos from S3 I noticed that whenever an s3 object has a space in its name it fails to stream.

However, when streaming objects without spaces in the name it works fine.

The solution is as follows:

I am using PHP and JW Player 4.3. The problem is due to JW player not encoding url when rtmp:// protocol is used (specifically in RTMPTModel.as file). So to fix the problem with playing files that have spaces you need to either:

  • Replace spaces with “+” and urlencode() the whole url after that. For example:
    
    urlencode("mp4:amazons3//file+name+with+spaces.m4v");
    
  • Double urlencode() the whole url. For example:
    
    urlencode(urlencode("mp4:amazons3//file name with spaces.m4v"));
    

Copy your bundled image on Amazon EC2 from one region to another

Wednesday, February 18th, 2009 by The BCM Team

If you have a bundled image in the us-east-1 region of Amazon EC2 and you want to move/copy it to Europe (eu-west-1). The following command will help you out:

ec2-migrate-bundle --cert certificate.pem --privatekey privatekey.pem
--access-key  --secret-key  --bucket  --destination-bucket
--manifest image.manifest.xml --location EU
–cert
Specifies what certificate file to use
–privatekey
Specifies what private key file to use
–access-key
Your AWS account access key
–secret-key
Your AWS account secret key
–bucket
Bucket in origin region where the image is located
–destination-bucket
Bucket in destination region where the image will be transfered to
–manifest
filename of manifest file of bundled image
–location
Region where you are moving your image to

Once you transfered your bundled image, you will need to register it as an image on your EU server with the following command:

ec2-register --region eu-west-1 <bucket-name>/<manifest-filename>

Elastic Cloud Compute (EC2) Now Available In Europe

Wednesday, December 10th, 2008 by François

AWS_LOGO_RGB_300pxAt last the moment we have all been waiting for. Amazon Web Services (AWS) has just announced that Elastic Cloud Compute (EC2) is being rolled out in Europe.

This is great news for us as we’ve been playing with EC2 while it was only available in the US. But now there’s a fully-fledged European data centre we can really get going with what we’ve been planning to do for quite some time.

Let me explain:

We believe that every client has their own unique hosting requirements. That’s why we’ve never resold hosting or entered into any affiliate relationships.

This mindset has given us the opportunity to test and use a wide range of hosting set-ups and providers.

From virtual private servers (VPS’s) to managed dedicated servers we’ve toyed with them all.

We aren’t particularly keen on adding to all the hype but we are genuinely excited by what Amazon Web Services has to offer.

Now that EC2 has finally landed in Europe we will be upping our testing of AWS by deploying our own live site on EC2.

Yes, yes, I can hear your wails of derision. Why do this when you could get a dedicated server for a similar price? Why would you deploy your live site on an untried platform? Etc, etc, etc.

Well of course many of these assertions are valid but here’s the thing: we’ve guesstimated the risk and believe we can derive far greater value from migrating now and learning from the experience.

Having looked at server logs over the years it is clear that numerous people and companies overpay for underutilised server capacity. And in these cases it is clear that using a service such as AWS would offer numerous operational benefits.

What’s more we don’t particularly feel comfortable advising clients to use something if we have no “real world” experience of using it ourselves.

So in a nutshell the potential benefits AWS could provide, in certain circumstances, is to compelling to ignore.

Irrespective of the outcome this is something we are certainly looking forward to and deep-down I have a funny feeling we won’t regret this one.

Hints collection for a quick start with Amazon EC2 and S3

Wednesday, May 14th, 2008 by The BCM Team

These instructions are for Windows environment.

  • Download a private key and an x.905 certificate from your control panel on Amazon website and place them into the same folder as the batch file and EC2 Command line tools mentioned below.
  • Configure your environment variables. I suggest either add the settings to your Windows installation options or use the following batch file:
    
    @echo off
    set EC2_HOME=C:\ec2
    set PATH=%PATH%;%EC2_HOME%\bin
    set EC2_PRIVATE_KEY=%EC2_HOME%\privatekey.pem
    set EC2_CERT=%EC2_HOME%\certificate.pem
    set JAVA_HOME=C:\Program Files\Java\jre1.6.0_xx
    "%JAVA_HOME%\bin\java" -version
    

    privatekey.pem” and “certificate.pem” are the files mentioned above.Be sure to have Java Runtime Environment 1.5+ installed. You will also need to download EC2 Command Line tools from Amazon AWS Resource Center page.

  • Choose an Operating System image (AMI) that you will be using as a base for your server OS installation. For example, I am using an image of a base install of CentOS 5.0
  • You can see a list of all available images using the following command “ec2-describe-images -x all“. Here, “-x all" means show all available images available. Each image has a unique number listed before the description. You will need this number to refer to the image.
  • ec2-add-keypair <private_key_file_name> – generate private/public key file to use with SSH client that you choose to use. Where <name> is a name of a file of
  • ec2-run-instances ami-08f41161 -k <private_key_file_name> – run an instance of your AMI
  • ec2-terminate-instances <instance_number> – terminate a running instance
  • ec2-authorize default -p 22 and ec2-authorize default -p 80 – open ports for HTTP and SSH2
  • ec2-describe-instances – display stats for your AMIs
  • ec2-upload-bundle --retry -b <your bundle name> -m /mnt/image.manifest.xml -a <your access key> -s <your secret access key> – copy bundled AMI to your S3 storage
  • ec2-bundle-vol -d /mnt -k /mnt/<private_key.pem> -c /mnt/<certificate.pem> -u <aws_user_number>
  • ec2-upload-bundle --retry -b <your-s3-bucket> -m /mnt/image.manifest.xml -a <aws-access-key-id> -s <aws-secret-access-key>
  • ec2-register <your-s3-bucket>/image.manifest.xml