-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Amazon Web Services: Migrating your .NET Enterprise Application
By :
Here is a summary of the products covered in this book. Please note that this summary does not encompass all AWS products.
EC2 provides virtual computing resources on demand, in effect allowing virtual servers to be spun up and down on demand in the AWS cloud.
The command-line tools are provided by the Amazon staff and are located at:
http://aws.amazon.com/developertools/351
These are the environment variables used when setting up command-line tools:
set JAVA_HOME="C:\Program Files\Java\jre6" set EC2_PRIVATE_KEY=c:\aws\pk-XUSF3YX32DTZWSBHEIENR24EANXCXUBA.pem set EC2_CERT=c:\aws\cert-XUSF3YX32DTZWSBHEIENR24EANXCXUBA.pem set EC2_HOME=C:\AWS\ec2-api-tools\ec2-api-tools-1.3-62308 set PATH=%PATH%;C:\AWS\ec2-api-tools\ec2-api-tools-1.3-62308\bin
These are the commands used in this book:
|
Command |
Description |
Chapter |
|---|---|---|
|
ec2-describe-regions
|
List all of the current regions available |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-describe-images –o self
|
List all of the AMIs owned by the AWS user |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-run-instances ami-70b24319 -g migrate_to_aws_secure -k migrate_to_aws_key_pair --availability-zone us-east-1a –monitor
|
Start up an EC2 instance using AMI ami-70b24319 in the migrate_to_aws security group using the migrate_to_aws_key_pair key pair in the us-east-1a availability zone |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-create-tags i-cc9b92a1 --tag "Name=DB01"
|
Associate a tag with a running instance |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-describe-instances --filter "instance-state-name=running"
|
Get a list of running instances |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-terminate-instances i-cc9b92a1
|
Terminate a running instance |
Chapter 3, Getting Started with AWS and Amazon EC2 |
|
ec2-stop-instances i-cc9b92a1
|
Stop a running instance |
Chapter 3, Getting Started with AWS and Amazon EC2 |
The following figure shows the AWS console location for EC2:

The following is a summary of the costs and types of instances:
|
Name |
Description |
Approximate cost/year (on demand Windows, not including storage, network or other AWS costs, costs are for comparison only and are in $US) |
|---|---|---|
|
Standard – Small |
1.7 GB RAM, 1 EC2 compute unit, 32 bit, 160 GB local storage |
$1,051 |
|
Standard – Large |
7.5 GB RAM, 4 EC2 compute units, 64 bit, 850 GB local storage |
$4,204 |
|
Standard - Extra Large |
15 GB RAM, 8 EC2 compute units, 64 bit, 1690 GB local storage |
$8,409 |
|
Micro |
613 MB RAM, variable EC2 compute units to a max of 2, 64 bit |
$262 |
|
High Memory - Extra Large |
17.1 GB RAM, 6.5 EC2 compute units, 64 bit, 420 GB local storage |
$5,431 |
|
High Memory - Double Extra Large |
32.4 GB RAM, 13 EC2 compute units, 850 GB local storage, 64 bit |
$10,862 |
|
High Memory - Quadruple Extra Large |
68.4 GB RAM, 26 EC2 compute units, 1690 GB local storage, 64 bit |
$21,724 |
|
High CPU - Medium Instance |
1.7 GB RAM, 5 EC2 compute units, 350Gb local storage, 16 bit |
$2,540 |
|
High CPU - Extra Large |
7 GB RAM, 20 EC2 compute units, 64 bit, 1690 GB local storage |
$10,161 |
S3 is an object store for storing files on the cloud in AWS. Files of up to five terabytes may be stored.
S3 tools on Codeplex provided by third party.
Alternative tools provided at s3tools.org are located at:
To set up this tool use the following command:
s3 auth <Access Key> <Secret Access Key>
The following are the commands used throughout this book.
|
Command |
Description |
Chapter |
|---|---|---|
s3 auth AKIAIIJXIP5XC6NW3KTQ 9UpktBlqDroY5C4Q7OnlF1pNX tK332TslYFsWy9R
|
Set up credentials |
Chapter 4, How Storage Works on Amazon |
s3 list
|
List S3 buckets |
Chapter 4, How Storage Works on Amazon |
s3 put migrate_to_aws_02 myfile.txt
|
Upload a file to S3 |
Chapter 4, How Storage Works on Amazon |
|
s3 put migrate_to_aws_02/mybigfile/ mybigfile.txt /big
|
Upload in chunks a large file to S3 |
Chapter 4, How Storage Works on Amazon |
|
s3 get migrate_to_aws_02/myfile.txt
|
Download a file from S3 |
Chapter 4, How Storage Works on Amazon |
|
s3 get migrate_to_aws_02/mybigfile/mybigfile.txt /big
|
Download in chunks a big file from S3 |
Chapter 4, How Storage Works on Amazon |
The following screenshot shows the AWS console location for S3:

Storage for S3 costs approximately as follows:
For one (1) terabyte of storage for one year = $1,720
EBS provides raw disk to EC2 instances on AWS.
Command-line tools are provided by the EC2 command-line tools package.
These are the commands used throughout the book for EBS:
|
Command |
Description |
Chapter |
|---|---|---|
ec2-create-volume --size 20 --availability-zone us-east-1a
|
Creates an EBS volume |
Chapter 4, How Storage Works on Amazon |
|
ec2-attach-volume vol-b418c2dc -i i-e2fdea8f -d xvdg
|
Attach an EBS volume |
Chapter 4, How Storage Works on Amazon |
|
ec2-detach-volume vol-b418c2dc
|
Detach an EBS volume |
Chapter 4, How Storage Works on Amazon |
|
ec2-delete-volume vol-b418c2dc
|
Delete an EBS volume |
Chapter 4, How Storage Works on Amazon |
Windows: xvdf through to xvdp
Unix: /dev/sdf through to /dev/sdp
The following screenshot shows the AWS console location for EBS:

Storage for EBS costs approximately as follows:
For one (1) terabyte of storage for one year = $1,228
Amazon autoscaling provides for the dynamic creation of EC2 instances based on server demand.
Autoscaling command-line tools are provided by Amazon staff.
The Autoscaling tools are located at:
http://aws.amazon.com/developertools/2535
The environment variables used for the autoscaling tools are:
set AWS_AUTO_SCALING_HOME=C:\AWS\AutoScaling-1.0.33.1 set PATH=C:\AWS\AutoScaling-1.0.33.1\bin;%PATH%
These are the Autoscaling commands used throughout this book:
|
Command |
Description |
Chapter |
|---|---|---|
|
as-describe-launch-configs
|
Describe launch configuration information |
Chapter 9, Monitoring and Scaling My Application |
|
as-create-launch-config WebLaunchConfig --image-id ami-7cb54915 --instance-type m1.large –group "Web Servers"
|
Create the autoscaling launch configuration |
Chapter 9, Monitoring and Scaling My Application |
|
as-create-auto-scaling-group WebAutoScaleGroup --launch-configuration WebLaunchConfig --availability-zones us-east-1a --min-size 2 --max-size 4 –load-balancers my-load-balancer
|
Create the autoscaling group |
Chapter 9, Monitoring and Scaling My Application |
|
as-put-scaling-policy WebScaleUp --type ChangeInCapacity --adjustment 1 --cooldown 120 --auto-scaling-group WebAutoScaleGroup
|
Create an autoscaling (scale up) policy |
Chapter 9, Monitoring and Scaling My Application |
|
as-put-scaling-policy WebScaleDown --type ChangeInCapacity "--adjustment=-1" --cooldown 120 --auto-scaling-group WebAutoScaleGroup
|
Create an autoscaling (scale down) policy |
Chapter 9, Monitoring and Scaling My Application |
|
as-describe-auto-scaling-groups --headers
|
List all of the autoscale groups |
Chapter 9, Monitoring and Scaling My Application |
There is no console access to Amazon Autoscaling.
Amazon Autoscaling carries no additional fees for its use other than standard fees associated with EC2 instances, storage, and bandwidth.
Amazon CloudFront provides caching of website data in distributed locations worldwide to improve the performance of websites hosted in an AWS data center.
The following figure shows the AWS console location for CloudFront:

The calculation for costs is complex and based on HTTP requests as well as the size of data transferred. However, as a rough guide:
One (1) TB of data transferred each month for the period of one year in the US region = $1,843.
SimpleDB provides a simple key/value store for the reliable storage of simple data of any size.
http://aws.amazon.com/code/1137
Development libraries are located at:
|
Language |
Library Location |
|---|---|
|
.Net | |
|
Java | |
|
PHP | |
|
Ruby |
There is no console access to Amazon SimpleDB.
It is complex to approximate the cost for SimpleDB, however, as a rough guide:
One (1) TB of data stored in SimpleDB for a year will cost = $3,077.
If all of the data was transferred out in one year, data transfer cost = $1,843.
RDS provides a MySQL instance running and managed by AWS.
The command-line tools are provided by Amazon staff and are located at:
http://aws.amazon.com/developertools/2928
This is the only environment variable used:
Set AWS_RDS_HOME
The following screenshot shows the AWS console location for RDS:

Summary of instance types and costs:
|
Name |
Description |
Approximate Cost/year (on demand, costs include 1 TB of storage running for one year and are for comparison only and are in $US) |
|---|---|---|
|
Small RDS Instance |
1.7 GB RAM, 1 EC2 compute unit, moderate IO |
$2,192 |
|
Large RDS Instance |
7.5 GB RAM, 4 EC2 compute unit, high IO |
$5,083 |
|
Extra Large RDS Instance |
15 GB RAM, 8 EC2 compute units, high IO |
$8,937 |
|
High Memory Extra Large RDS Instance |
17.1 GB RAM, 6.5 EC2 compute units, high IO |
$6,922 |
|
High Memory Double Extra Large RDS Instance |
34 GB RAM, 13 EC2 compute units, high IO |
$12,616 |
|
High Memory Quadruple Extra Large RDS Instance |
68 GB RAM, 26 EC2 compute units, high IO |
$24,004 |
SQS provides for reliable asynchronous queuing and delivery of messages.
The command-line tools are provided by Amazon staff.
The scratchpad is located at:
http://aws.amazon.com/code/1254
The .Net SDK is located at:
http://aws.amazon.com/sdkfornet/
There is no console access to Amazon SQS.
Pricing is $0.01 per 10,000 requests.
SNS provides for reliable event and notification delivery to multiple endpoints such as mail and HTTP.
Amazon does not currently supply command-line tools for SNS.
HTTPS
HTTP
E-mail (JSON)
Amazon SQS
The following screenshot shows the AWS console location for SNS:

Pricing for one (1) TB of data transferred in/out of SNS every month over a twelve month period = $1,843
CloudWatch provides monitoring and alerting of metrics within the EC2 AWS environment.
The command-line tools are provided by Amazon staff.
The CloudWatch tools are located at:
http://aws.amazon.com/developertools/2534
The Cloudwatch environment variables used are:
set AWS_CLOUDWATCH_HOME=C:\AWS\CloudWatch-1.0.9.5 set PATH=C:\AWS\CloudWatch-1.0.9.5\bin;%PATH%
The following are the commands for CloudWatch used throughout this book.
|
Command |
Description |
Chapter |
|---|---|---|
mon-describe-alarms
|
Describe configured alarms |
Chapter 9, Monitoring and Scaling My Application |
mon-put-metric-alarm WebHighCPUAlarm --comparison-operator GreaterThanThreshold --evaluation-periods 1 --metric-name CPUUtilization --namespace "AWS/EC2" --period 120 --statistic Average --threshold 80 --alarm-actions arn:aws:autoscaling:us-east-1:764516644405:scalingPolicy:d3c53ac8-fa73-4cfd-9a06-a5f9d7e1a58f: autoScalingGroupName/WebAutoScaleGroup:policyName/WebScaleUp --dimensions "AutoScalingGroupName=WebAutoScaleGroup"
|
Create the cloud watch metric |
Chapter 9, Monitoring and Scaling My Application |
The following screenshot shows the AWS console location for CloudWatch:

Pricing for monitoring one instance is $3.50/month.
VPC allows the creation of custom, isolated compute environments with custom IP addressing schemes and isolated security.
Command-line tools are provided by the EC2 command-line tools package.
The following screenshot shows the AWS console location for VPC:

Pricing for one VPC connection over a one year period is = $438.
ELB provides TCP/IP load balancing across multiple EC2 instances.
Command-line tools are provided by the EC2 command-line tools package.
The following screenshot shows the AWS console location for ELB:

Pricing for one load balancer over a one year period if one (1) TB of data is transferred is = $317
Amazon import/export allows the transfer of large amounts of data in and out of AWS.
The command-line tools are provided by Amazon staff and are located at:
http://awsimportexport.s3.amazonaws.com/importexport-webservice-tool.zip
|
Command |
Description |
Chapter |
|---|---|---|
java -jar lib/AWSImportExportWebServiceTool-1.0.jar CreateJob Import MyManifest.txt
|
Create a job information |
Chapter 4, How Storage Works on Amazon |
java -jar lib/AWSImportExportWebServiceTool-1.0.jar ListJobs
|
List all jobs |
Chapter 4, How Storage Works on Amazon |
java -jar lib/AWSImportExportWebServiceTool-1.0.jar CancelJob XHNHC
|
Cancel a job |
Chapter 4, How Storage Works on Amazon |
There is no console access to Amazon SQS.
Around $80 per device
Change the font size
Change margin width
Change background colour