Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Implementing Cloud Design Patterns for AWS
Implementing Cloud Design Patterns for AWS

Implementing Cloud Design Patterns for AWS: Create highly efficient design patterns for scalability, redundancy, and high availability in the AWS Cloud

eBook
€26.98 €29.99
Paperback
€36.99
Hardcover
€32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Implementing Cloud Design Patterns for AWS

Chapter 2. Basic Patterns

The first patterns we will learn are considered to be the most rudimentary patterns for Cloud infrastructure. Many patterns throughout this book will be very heavily tied to AWS-specific services while the patterns here can be applied in many other Cloud virtualization infrastructures that have similar capabilities. In this chapter we will cover the following topics:

  • Snapshot pattern
  • Stamp pattern
  • Scale up pattern
  • Scale out pattern
  • On-demand disk pattern

For this chapter, I will use the Amazon provided and supported Amazon Machine Image (AMI) titled Amazon Linux AMI. The base AMI that you choose or the machine type to launch the AMI is not important for this chapter, as long as it is a Linux image. Images based on Windows have some inconsistencies and require special steps to be taken to create reusable images and snapshots. While following along, if you decide to use an alternate image, the code snippets may not work as expected.

Note

For more information on...

Introducing Vagrant

Throughout this book, the user will be creating running instances to follow along. The AWS console is suitable for all examples, as well as Vagrant, and will be demonstrated as such.

Vagrant, as described in the introduction, is a piece of software that has a configuration file, or Vagrantfile, which describes how to run a virtual machine under a provider. Vagrant, by default, does not have the AWS provider built in and requires a plugin Vagrant-AWS. To install Vagrant, download the latest version from their website http://www.vagrantup.com and install it as described in their HOWTO.

Once Vagrant is installed correctly, the AWS plugin can be installed as follows:

$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.5.0)'!

Every provider for Vagrant requires a base box, which is not applicable for AWS. A box file is a compressed virtual machine disk with its configuration...

Snapshot pattern

The first basic pattern that we will cover is the snapshot pattern. This pattern is the basis for many other patterns described throughout this book and includes the way to create an S3-backed, point-in-time snapshot of a running instance from the AWS console. To do this, we will select a running instance from the EC2 console and select the root device volume from the instance pull-up frame, which will bring up a pop-up for the volume as shown in the following screenshot:

Snapshot pattern

Click the EBS ID link from the pop-up. This will bring you to the Volumes section of the AWS console with the previously selected volume in context. From here, select the Actions drop-down and select Create Snapshot as shown in the following screenshot:

Snapshot pattern

You will now be prompted for a name and description, but they are optional so go ahead and click Create. The next window will give you a success prompt with a snapshot identifier. If you select the snapshot id, it will take you to the Snapshot section of...

Stamp pattern

The pattern covered here is called the stamp pattern because it covers how to replicate a bootable operating system similar to a rubber stamp of sorts. By creating an image of an operating system that is pre-configured for a purpose, it can be easily replicated by simply bringing it up when needed in the same way a stamp works by creating a template.

We will actually create a new AMI to use throughout this book from this method. The AWS Linux AMI, by default, does not allow sudo without a TTY terminal. There's a simple fix for this but it must be run every time we boot from the AWS Linux AMI unmodified. Instead, we will make this fix to their image and package it into our own AMI.

This is useful because Vagrant requires sudo to be usable for many of its features such as folder synchronization, and provisioners such as Puppet and Chef. If you were to try to run Vagrant on their base AMI, you would get an output such as:

$ vagrant up --provider aws
Bringing machine &apos...

Scale up pattern

The scale up pattern is a method that allows a server to change size and specifications dynamically, and as needed. Imagine a running web instance that does a bit of computation per request. Initially, it performs extremely well, but over time traffic becomes heavier and causes the computation time to increase. A couple of options exist to solve this problem, but all have their own benefits and issues.

One option could be to spin up a second instance (or scale outwards), but this means double the cost, as well as any maintenance required to be performed on each server. For applications in the Cloud, it is important not only to think of the cost involved in the server, but also the implied costs, such as operational. The easiest solution might be to change the specs on the current server or scaling up. A benefit of this method is that, if the processing peak can be predicted, such as the beginning of the month or the end of the month transactions, this method can be automated...

Scale out pattern

We have discussed up to this point how to scale up in resources on an instance but not how to scale out. Scaling up an instance can only help in a few limited examples, but the more important issue is how to add processing power without affecting the client or the systems interacting with our services. To do this, we will tie together a few different EC2 resources. The resource diagram, as shown, will help to visualize what we are trying to accomplish:

Scale out pattern

The general process for this pattern is:

  • Create an elastic load balancer with forwarding ports and health checks
  • Create a launch configuration for the instance
  • Create an auto scaling group with configured CloudWatch alarms and scaling policies

To demonstrate this, we will first create an elastic load balancer. Browse to the Load Balancers portion of the AWS console and select Create Load Balancer as seen in the following screenshot:

Scale out pattern

At the Define Load Balancer prompt, give it a descriptive name in the Load Balancer Name text box...

Introducing Vagrant


Throughout this book, the user will be creating running instances to follow along. The AWS console is suitable for all examples, as well as Vagrant, and will be demonstrated as such.

Vagrant, as described in the introduction, is a piece of software that has a configuration file, or Vagrantfile, which describes how to run a virtual machine under a provider. Vagrant, by default, does not have the AWS provider built in and requires a plugin Vagrant-AWS. To install Vagrant, download the latest version from their website http://www.vagrantup.com and install it as described in their HOWTO.

Once Vagrant is installed correctly, the AWS plugin can be installed as follows:

$ vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.5.0)'!

Every provider for Vagrant requires a base box, which is not applicable for AWS. A box file is a compressed virtual machine disk with its configuration. For example...

Snapshot pattern


The first basic pattern that we will cover is the snapshot pattern. This pattern is the basis for many other patterns described throughout this book and includes the way to create an S3-backed, point-in-time snapshot of a running instance from the AWS console. To do this, we will select a running instance from the EC2 console and select the root device volume from the instance pull-up frame, which will bring up a pop-up for the volume as shown in the following screenshot:

Click the EBS ID link from the pop-up. This will bring you to the Volumes section of the AWS console with the previously selected volume in context. From here, select the Actions drop-down and select Create Snapshot as shown in the following screenshot:

You will now be prompted for a name and description, but they are optional so go ahead and click Create. The next window will give you a success prompt with a snapshot identifier. If you select the snapshot id, it will take you to the Snapshot section of the...

Left arrow icon Right arrow icon

Description

This book is aimed at architects, solution providers, and those of the DevOps community who are looking to implement repeatable patterns for deploying and maintaining services in the Amazon cloud infrastructure. Prior experience using AWS is required as the book focuses more on the patterns and not on the basics of using AWS.

Who is this book for?

This book is aimed at architects, solution providers, and those of the DevOps community who are looking to implement repeatable patterns for deploying and maintaining services in the Amazon cloud infrastructure. Prior experience using AWS is required as the book focuses more on the patterns and not on the basics of using AWS.

What you will learn

  • Create and maintain server backups
  • Implement scaling policies on schedules, influxes in traffic, and deep health checks
  • Provision servers and data that persist through termination
  • Make complete use of high availability storage and redundancy storage
  • Design content delivery networks to improve user experience
  • Optimize databases through caching and sharding
  • Monitor and queue data for processing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 29, 2015
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781782177340
Vendor :
Amazon
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 29, 2015
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781782177340
Vendor :
Amazon
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 115.97
Learning AWS
€41.99
AWS Administration ??? The  Definitive Guide
€36.99
Implementing Cloud Design Patterns for AWS
€36.99
Total $ 115.97 Stars icon

Table of Contents

12 Chapters
1. Introduction Chevron down icon Chevron up icon
2. Basic Patterns Chevron down icon Chevron up icon
3. Patterns for High Availability Chevron down icon Chevron up icon
4. Patterns for Processing Static Data Chevron down icon Chevron up icon
5. Patterns for Processing Dynamic Data Chevron down icon Chevron up icon
6. Patterns for Uploading Data Chevron down icon Chevron up icon
7. Patterns for Databases Chevron down icon Chevron up icon
8. Patterns for Data Processing Chevron down icon Chevron up icon
9. Patterns for Operation and Maintenance Chevron down icon Chevron up icon
10. Patterns for Networking Chevron down icon Chevron up icon
11. Throw-away Environments Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.8
(5 Ratings)
5 star 20%
4 star 0%
3 star 40%
2 star 20%
1 star 20%
Krzysztof Satola Sep 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
ShortA great reference guide filled with detailed implementation design examples in the do-it-yourself fashion, showing best practices to cloud applications design. Can serve as a basic toolkit for building more complex designs as well as practical guide to AWS operations. Complements nicely AWS Cloud Design Patterns (CDP).FullThis book is aimed at architects, solution providers, and DevOps interested in repeatable implementation patterns for deploying and maintaining services in the Amazon Cloud infrastructure. The beginning of the Implementing Cloud Design Patterns for AWS covers general cloud-related introductory topics, cloud computing service models, benefits of moving to the cloud, and some specific concerns related to AWS (i.e. over- and under-provisioning). The rest of the book is focused on different patterns in high availability, data processing, operations and maintenance, networking, and dynamic infrastructure.I like the way the content of this book is organized. The author introduces some atom patterns (i.e. Stamp pattern) and then reuses them while explaining more complicated scenarios (i.e. Multi-server pattern). He starts with the very basic topics to finish with the more complex ones: microservices, DevOps and infrastructure as code, temporary development environments or continous integration. I wish the latter topics were described in greater detail. Maybe this would happen in the next release of this useful book?The structure of the book is based on AWS Cloud Design Patterns (CDP), a collection of solutions and design ideas for using AWS cloud technology to solve common systems design problems. I find it as an implementation guide for the patters defined on the CDP website. All use cases are shown in a consistent way with step-by-step instructions of how to simulate/accomplish them using AWS Management Console or third party tools like Vagrant or Varnish. Readers will need some basic AWS knowledge though to better understand what is happening in the background while performing these hands-on exercises. As the book complements the CDP, I would recommend readers to start with the pattern descriptions on the CDP website and then refer to the book, to see how to implement specific patterns. Both, the book and the website, play very nice together and can become a valuable asset in a cloud architect’s library.I like the author’s recommendations and caution points which can be found throughout the book. In my opinion the are very valid and represent quite pragmatic approach to topics being discused. The book consists of screenshots, short comments and command-line or code snippets, very concise and straight to the point.The book could be also used by readers not very interested in the cloud design but just wanting to get some guidance on how to play with some AWS-based services (instantiating EC2 images, configuring ELBs, working with S3 and so on). Links to specific sections of AWS documentation available in the book may also help with deeper understanding of how services described in the book actually work.As the move to cloud infrastructure brings to the table a huge set of questions on how to handle issues such as load balancing, content delivery networks, failover, and replication, this book can definitely help to tackle all of them one by one.
Amazon Verified review Amazon
I.F. Jun 25, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Very essential and yet effective. A perfect introduction to the Amazon AWS service
Amazon Verified review Amazon
david Aug 14, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
It covers all deployment patterns on AWS: Networking, Maintenance, Monitoring, DB, Backup, Data, etc .. in a very practical way with easily implementable simple examples. It is an interesting guide that offers ideas for deploying applications on Amazon AWS.Also in the final chapters refers to the interaction with other applications to integrate with AWS CI: Packer, Vagrant, etc ...Recommended to have an overview of what Amazon AWS can offer and provides different deployment patterns.
Amazon Verified review Amazon
FireTV is unreliable as HELL ! Jun 19, 2017
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
By definition a design pattern is a tried and tested production grade solution, this book is just a collection of basic ideas which describe how a handful of AWS features work, it is full of caveats saying how the solution would not work in the real world.All in it's not worth much, the free AWS white papers contain better information, this is not even a 'complete' beginners guide.
Amazon Verified review Amazon
Dirk Estievenart Dec 08, 2015
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
I bought the Kindle edition.- The table of contents is not working on Kindle, so each time you need to jump to another chapter, you'll have to scroll back to the beginning of the book. This is quite annoying for a tech book!- The book is difficult to read and navigate overall.- All the examples are written in bash which is OK for sysadmin tasks, but this will hardly be the way you'll implement your applications.- The patterns are obvious and any developer with some experience can figure them out by thinking 5 minutes.- Worst of all, this book hardly handles any AWS service!! Kinesis? SNS? DynamoDB? Elasticache? Lambda?I'd expect from a book about patterns for AWS to use ElastiCache instead of setting up a Redis yourself.Don't waste your money on this.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.

Modal Close icon
Modal Close icon