Amazon Web Services: Migrating your .NET Enterprise Application
By Rob Linton
()
About this ebook
Related to Amazon Web Services
Related ebooks
The Best Damn Exchange, SQL and IIS Book Period Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Azure Enterprise Application Development Rating: 0 out of 5 stars0 ratingsSecuring Amazon Web Services Rating: 4 out of 5 stars4/5Securing Windows Server 2008: Prevent Attacks from Outside and Inside Your Organization Rating: 0 out of 5 stars0 ratingsMicrosoft System Center Configuration Manager Advanced Deployment Rating: 0 out of 5 stars0 ratingsAWS Certified Security Study Guide: Specialty (SCS-C01) Exam Rating: 0 out of 5 stars0 ratingsAWS Certified Database Study Guide: Specialty (DBS-C01) Exam Rating: 0 out of 5 stars0 ratingsIPsec VPN A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsAWS IAM A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsAWS Key Management Service and AWS CloudHSM Third Edition Rating: 0 out of 5 stars0 ratingsAWS Config A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsAWS CloudFormation A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsCloud Migration A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsAWS CloudFormation A Complete Guide Rating: 0 out of 5 stars0 ratingsServerless Architectures On AWS A Complete Guide - 2020 Edition Rating: 1 out of 5 stars1/5Understanding Azure Monitoring: Includes IaaS and PaaS Scenarios Rating: 0 out of 5 stars0 ratingsAmazon SimpleDB: LITE Rating: 0 out of 5 stars0 ratingsCloudFormation A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsChaos Engineering A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsAzure AD Domain Services A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsPKI Management A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsAWS EC2 Instance Families A Complete Guide Rating: 0 out of 5 stars0 ratingsCloud database Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals Rating: 0 out of 5 stars0 ratingsAzure AD Domain Services A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsExam AZ 900: Azure Fundamental Study Guide-2: Explore Azure Fundamental guide and Get certified AZ 900 exam Rating: 0 out of 5 stars0 ratingsPractical OneOps Rating: 0 out of 5 stars0 ratingsIT Infrastructure Monitoring Tools A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsSoftware-Defined Networking SDN production A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsAngularJS Web Application Development Cookbook Rating: 0 out of 5 stars0 ratings
Information Technology For You
Practical Ethical Hacking from Scratch Rating: 5 out of 5 stars5/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5How To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Codeless Data Structures and Algorithms: Learn DSA Without Writing a Single Line of Code Rating: 0 out of 5 stars0 ratingsCybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsHow to Write Effective Emails at Work Rating: 4 out of 5 stars4/5CompTIA A+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Core 1 Exam 220-1101 Rating: 0 out of 5 stars0 ratingsComputer Science: A Concise Introduction Rating: 4 out of 5 stars4/5Computer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Learning Nagios 4 Rating: 5 out of 5 stars5/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5Linux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5CompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsInkscape Beginner’s Guide Rating: 5 out of 5 stars5/5Hacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Windows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5CompTIA Network+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008 Rating: 0 out of 5 stars0 ratingsThe Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Rating: 4 out of 5 stars4/5Hack Proofing Your Network Rating: 0 out of 5 stars0 ratingsPanda3d 1.7 Game Developer's Cookbook Rating: 0 out of 5 stars0 ratingsA Practical Guide Wireshark Forensics Rating: 5 out of 5 stars5/5Handbook of Digital Forensics and Investigation Rating: 4 out of 5 stars4/5
Reviews for Amazon Web Services
0 ratings0 reviews
Book preview
Amazon Web Services - Rob Linton
Table of Contents
Amazon Web Services: Migrating your .NET Enterprise Application
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding Amazon Web Services
What AWS is
What AWS isn't
PaaS
SaaS
So why AWS
What you should know about AWS
What to watch out for with AWS
Drivers of Enterprise Adoption of AWS
What application models work/don't work in AWS
One-Tier
Two-Tier
Three-Tier
N-Tier
Common issues across all architecture models
Legalities of Cloud Computing
A brief technical overview of AWS
Public or Virtual Private Cloud
The technology behind AWS
Our sample enterprise application
Rules of engagement
What will our sample enterprise application look like
What will our sample enterprise application do
Summary
2. Mapping your Enterprise Requirements Against Amazon's Offerings
AWS offerings
Simple Storage Service (S3)
General roles of S3 in the architecture
Using S3
S3 features
Data storage
Availability
Data consistency
Object access
Using S3 for backup, archiving, and recovery
Elastic Compute Cloud (EC2)
General roles of EC2 in the architecture
Using EC2
Features of EC2
Starting instances
Accessing instances after they have been started
Types of hardware to run an instance on
Types of billed instances
Billing and data transfer
Elastic IP addresses
Instance types
Standard instances
Micro instances
High memory instances
High-CPU instances
Cluster compute instances
Cluster GPU instances
Putting these instances in perspective
Elastic Block Store (EBS)
Some things to know about EBS
Attaching a two TB of disk to an EC2 instance
Security Groups
Implementing an example security group for a web application
Management security group
Web server security group
Application server security group
Database server security group
Using the AWS console tools
Virtual Private Cloud (VPC)
Using AWS for testing
Management servers
Test servers
Storage servers
Storage server security group
Basic CloudWatch
Detailed CloudWatch
Elastic Load balancing (ELB)
Amazon Relational Database Service (RDS)
Replication and availability
Backups and recovery
Amazon Simple Notification Service (SNS)
Publish and subscribe
General role in the architecture
Mapping of AWS offerings to our sample application
Load balancing
Hardware (Servers)
Hard disk storage
Firewall security
Performance monitoring
Database servers
Recapping our sample application's architecture
Mapping of AWS offerings to other requirements
Business requirements
Financial requirements
Functional requirements
Security, legal, and regulatory requirements
Summary
3. Getting Started with AWS and Amazon EC2
Creating your first AWS account
Multi-factor authentication
Registration and privacy details
AWS customer agreement
Section 10.2 – Your Applications, Data, and Content
Section 14.2 – Governing Law
Section 11.2 – Applications and Content
Signing in
Signing up for Amazon S3
Signing up for EC2
Starting an EC2 instance
Creating a security group
Starting the EC2 instance
Accessing your EC2 instance
Configuring your instance
Starting new EC2 instances from our base image
Saving your new instances as AMIs
Using the command line
Installing the AWS command-line tools
Installing Java
Creating a location to store your data
Getting your security keys
Downloading and installing the AWS tools
Creating a file to set up the AWS environment
Using the command line
Starting an EC2 instance
Stopping an EC2 instance
Summary
4. How Storage Works on Amazon
Getting started with S3
Creating a S3 bucket with logging
Using the S3 command-line tools
Setting up your credentials with S3.exe
Copying files to S3 using S3.exe
Retrieving files from S3 using S3.exe
Importing and exporting large amounts of data in and out of S3
Setting up the Import/Export service
Using the Import/Export service
Confirming your device specifications
Downloading and installing the command-line service tool
Creating a job
Copying the data to your disk device
Sending your disk device
Managing your Import/Export jobs
Accessing S3 using third-party tools
Getting started with EBS
Creating an EBS volume
Creating an EBS snapshot
An important note about EBS
Using the EBS command-line tools
Setting up storage for our sample application
Backup storage on S3
Summary
5. Amazon's Approach to Networking
An overview of AWS networking
Examining internal versus external IP addresses
Allocating elastic IPs
Security groups and internal versus external IP addresses
Handling domain controllers in AWS
Amazon VPC
Creating the AWS VPC
Starting servers in your VPC
AWS elastic load balancing
Using ELB for HTTPS
Amazon CloudFront networking
Setting up the networking for our sample application
The database layer
The application server layer
The web server layer
Summary
6. Putting Databases in the Cloud
Examining SQL Server
SQL Server AMI
SQL Server costs
Setting up SQL Server
Managing the SQL Server
Connecting to SQL Server
Integrated security versus mixed mode security
Windows firewall
Importing data to the SQL instance
Using the AWS console on your new SQL Server instance
Oracle
Oracle AMIs
Licensing
Setting up Oracle
Managing the Oracle instance
Importing data to the Oracle instance
Other Amazon database services
Amazon RDS
Setting up the RDS service
RDS pricing
Creating an RDS instance
Connecting to the RDS instance
Security for RDS
Managing the RDS instance
Connect using client tools
Importing data into the RDS instance
Amazon SimpleDB
Getting started with SimpleDB
Summary
7. Migrating your Data and Deploying your Code
Sample application code
Installing the pre-requisites
Disabling Internet explorer enhanced security configuration
Installing IIS
Installing .Net 4.0 and the MVC extensions
Configuring IIS
Installing the Application
Installing the database servers
Security
Mirroring and failover
Application Servers
Web Servers
Testing our sample application
Troubleshooting our application
Summary
8. Amazon's Queuing and Notification Options
Simple Queue Service (SQS)
Getting started
SQS Scratchpad
AWS SDK for .Net library and sample code
An overview of how SQS works
Creating your first queue
Testing the full SQS lifecycle of a message
SQS pricing and limits
Simple Notification Service (SNS)
An overview of how SNS works
Getting started
Creating a subscription
Creating an e-mail subscription
Testing our SNS subscription
Testing a HTTP subscription
SNS pricing and limits
Applying SQS and SNS to our sample application
Summary
9. Monitoring and Scaling My Application
Autoscaling
Installing the AWS Autoscaling tools
Installing the CloudWatch API tools
Architecture changes to Waaah for autoscaling
Creating the application server load balancer
Creating the autoscaling configuration
Creating the launch configuration
Creating the autoscaling group
Creating an autoscale policy
Creating the CloudWatch metric
Checking our autoscaling
Final configuration changes
Pricing for autoscaling
Using Amazon CloudWatch to monitor our application
CloudWatch in the AWS console
Pricing for CloudWatch
Summary
10. Testing and Maintaining the Application
Post deployment
Load testing
Grinder—an open source load test tool
Starting the AMI
Using grinder
Modifying the registry values on all of your servers
Starting the remote agents
Creating/Editing the test scripts
Running the test
Re-running the test
Patch Management, Quality Assurance (QA), and backups
The problem to be solved
The solution
Solving the problem, step-by-step
Bundling the existing production EC2 instances
Creating new running EC2 instances
Configuring the new instances
Allocating a new elastic IP addresses and modifying the DNS settings
Creating new load balancers
Modifying the web.config files
Modifying the security groups
Applying the relevant patches and service packs
Re-running the functional tests
Re-run the Grinder load test
The solution for the next steps
Summary
A. AWS Reference
List of AWS terms and keywords
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
AWS products covered in this book
Amazon Elastic Compute Cloud (EC2)
Command-line tools
Environment variables used
Commands used in the book:
Summary of instance types and costs
Amazon Simple Storage Service (S3)
Command-line tools
Commands used in the book
Approximate costs
Amazon Elastic Block Store (EBS)
Command-line tools
Commands used in the book:
Available EBS Devices
Approximate costs
Amazon Autoscaling
Command-line tools
Commands used in the book:
Approximate costs
Amazon CloudFront
Approximate costs
Amazon SimpleDB
Tools are located at
Approximate costs
Amazon Relational Database Service (RDS)
Command-line tools
Amazon Simple Queue Service (SQS)
Command-line tools
Approximate pricing
Amazon Simple Notification Service (SNS)
Command-line tools
Subscription options
Approximate pricing
Amazon CloudWatch
Command-line tools
Commands used in the book:
Approximate pricing
Amazon Virtual Private Cloud (VPC)
Command-line tools
AWS console
Approximate pricing
Amazon Elastic Load Balancing
Command-line tools
Approximate pricing
Amazon Import/Export
Command-line tools
Commands used in the book:
Approximate pricing
List of AWS data centers and regions
Location of CloudFront edge locations
Index
Amazon Web Services: Migrating your .NET Enterprise Application
Amazon Web Services: Migrating your .NET Enterprise Application
Copyright © 2011 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2011
Production Reference: 1150711
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-849681-94-0
www.packtpub.com
Cover Image by Dan Anderson ( <Dan@CAndersonAssociates.com>)
Credits
Author
Rob Linton
Reviewers
Ben Cherian
Nimish Parmar
Derek Schwartz
Acquisition Editor
Stephanie Moss
Development Editor
Hyacintha D'Souza
Kartikey Pandey
Technical Editors
Joyslita D'Souza
Arun Nadar
Copy Editor
Laxmi Subramanian
Project Coordinator
Leena Purkait
Proofreader
Mario Cecere
Indexer
Monica Ajmera Mehta
Graphics
Geetanjali Sawant
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Author
Rob Linton is the CTO and co-founder of Logicaltech Systalk, a successful integration company based in Melbourne, Australia.
He has been a database professional for the past 15 years, and for the five years before that, a spatial information systems professional, making him a data specialist for over 20 years.
He is a certified Security Systems ISO 27001 auditor, and for the past two years he has been working in the cloud, specializing in cloud data persistence and security.
He is a certified DBA and is proficient in both Oracle and Microsoft SQL Server, and is a past Vice President of the Oracle User Group in Melbourne, Australia.
He is also the creator of Jasondb, a cloud-based Restful database written entirely in C/C++ that resides up in the cloud on Amazon Web Services (AWS).
In his spare time he enjoys coding in C++ on his Macbook Pro and chasing his kids away from things that break relatively easily.
Acknowledgement
No book is the product of just the author – he just happens to be the one with his name on the cover.
A number of people contributed to the success of this book, and it would take more space than I have to thank each one individually.
A special shout out goes to Stephanie Moss, the Acquisition Editor at Packt, and Ben Cherian, who is the reason that this book exists.
Thank you Stephanie for believing in me and believing in my ability to produce this book, your feedback has been wonderful.
Thank you Ben, for the initial work in setting up the outline for this book, your work was invaluable.
I would also like to thank Peter, my twin brother and CEO of Systalk, for allowing the space to make this book happen. A book project of this size was inevitably going to require some flexibility in my day job, and I appreciate the flexibility he gave me to make this happen.
(I promise I'll bill more hours this year round Pete).
Also thank you to Kartikey Pandey, my development editor, and Leena Purkait, my project coordinator at Packt, you are both professional to the core.
Finally, I would like to thank the team behind Amazon Web Services, who are mostly anonymous; you are all doing a great job, keep it up.
About the Reviewers
Nimish Parmar has over seven years of solid software development experience in a wide variety of industries ranging from online video to mobile. Currently, he is working at StumbleUpon.com in the web content discovery space as a Senior Software Engineer building cutting edge applications serving millions of users every day. Nimish has an MS in Computer Science from University of Southern California, Los Angeles, California and a BE in Computer Engineering from University of Mumbai, India. He currently lives in San Francisco, California and enjoys snowboarding at Lake Tahoe in his spare time. He is also an avid football fan—both college and professional.
I would like to thank my parents Ragini and Bipinchandra for always encouraging me to reach my maximum potential and for always believing in me that I could. I owe them a debt of gratitude. And my brother Krunal for being the most awesome younger brother one can ask.
Derek Schwartz with over 16 years of experience in Information Technology has a Bachelor of Science degree in Information Technology from the University of Phoenix, and a Master of Science degree in Information Management from the W. P. Carey School of Business at Arizona State University.
He started his career as a contractor at Intel Corporation, providing desktop computer support. After several contracts at large technology companies, he advanced into server and LAN administration and further extended his skills to include system scripting and automation. This eventually led to software development of desktop and web applications. Recent interests include cloud computing infrastructure and SaaS business and application architecture.
Derek is currently employed as I.T. Systems Engineer at Rowland Constructors Group, Inc. (http://rowlandconstructors.com/), a construction general contractor with offices in Arizona and Texas. He also runs a small business, Bit-Smacker Digital Engineering (http://bit-smacker.com), which provides technical consulting services, web services, and custom software.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
This book is dedicated to my wife Fiona, who loves and tolerates me, and my children Kai and Jari, without whom my life would be quite boring.
This book would not have been possible without your love, understanding and your ability to ignore me when I was locked away in the study for days on end (literally). Thank you from the bottom of my heart.
(Yes, Jari, you can smash me at Modern Warfare 2 now, and yes Kai, I know your Tyranid's pawn my Imperial Guards)
Preface
Amazon Web Services is an Infrastructure as a Service (IaaS) platform in the Cloud, which businesses can take advantage of as their needs demand. The Amazon Cloud provides the enterprise with the flexibility to choose whichever solution is required to solve specific problems, ultimately reducing costs by only paying for what you use.
While enterprises understand moving their applications among infrastructure they own and manage, the differences in Amazon's infrastructure bring up specific business, legal, technical, and regulatory issues to get to grips with.
This step-by-step guide to moving your Enterprise .NET application to Amazon covers not only the concept, technical design, and strategy, but also enlightens readers about the business strategy and in-depth implementation details involved in moving an application to Amazon. You'll discover how to map your requirements against the Amazon Cloud, as well as secure and enhance your application with AWS.
This book helps readers achieve their goal of migrating a .NET Enterprise Application to the AWS cloud. It guides you through the process one step at a time with a sample enterprise application migration. After comparing the existing application with the newly migrated version, it then moves on to explain how to make the hosted application better. It covers how to leverage some of the scalability and redundancy built into the Cloud, and along the way you'll learn about all of the major AWS products like EC2, S3, and EBS.
What this book covers
Chapter 1, Understanding Amazon Web Services and Exploring Enterprise Application Models, we will look at some of the common architecture styles, and how they fit into AWS. We will also describe the sample application that we will use throughout the book