Book Image

Implementing Cloud Design Patterns for AWS

Book Image

Implementing Cloud Design Patterns for AWS

Overview of this book

Table of Contents (18 chapters)
Implementing Cloud Design Patterns for AWS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Cloud dependency injection pattern


One benefit to the previous bootstrap pattern was that we were able to separate small configurations of the instance at start-up. This allowed us to alleviate some maintenance headaches, such as modifying the web page content on-the-fly. Imagine that the application consists of multiple web servers or even servers with entirely different purposes. For example, the user data we provided for the web server is not relevant to a database instance.

To take this further, we could separate it even further and have a common set of user data across all instances. This user data could go to S3 and get the actual configuration script it needs, whether that is to set it up as a web server or a database server, and run that. To do this, we would need metadata at the start up level to decide what user data to use.

To resolve this, we will make use of the tagging system that AWS provides for nearly all of its services, including EC2 instances. Tags are quite common on instances...