What are OpsWorks Stacks

Last Updated : 07-Oct-2020

First let's start with OpsWorks.  AWS OpsWorks is a configuration management service that helps you configure and operate applications in a cloud enterprise by using Puppet or Chef.

AWS OpsWorks Stacks and AWS OpsWorks for Chef Automate let you use Chef cookbooks and solutions for configuration management, while OpsWorks for Puppet Enterprise lets you configure a Puppet Enterprise master server in AWS. Puppet offers a set of tools for enforcing the desired state of your infrastructure, and automating on-demand tasks.

While Elastic Beanstalk is sufficient for deploying web applications and CloudFormation for standing up AWS infrastructure, neither is able to manage detailed configuration of the operating systems and infrastructure such as updates and configuration of EC2 instances.

Often when migrating from on premise, Chef and Puppet were used to manage the infrastructure and hence the same toolsets and configuration can be repurposed for use of the cloud or for managing a hybrid cloud environment. OpsWorks for Puppet Enterprise lets you use Puppet to automate how nodes are configured, deployed, and managed, whether they are Amazon EC2 instances or on-premises devices

AWS OpsWorks Stacks, provides a simple and flexible way to create and manage stacks and applications. and deploy and monitor applications in your stacks. You can create stacks that help you manage cloud resources in specialized groups called layers. A layer represents a set of EC2 instances that serve a particular purpose, such as serving applications or hosting a database server. Layers depend on Chef recipes to handle tasks such as installing packages on instances, deploying apps, and running scripts.


Automatic Scaling of Stacks

Automatic scaling is based on two instance types, which adjust a layer's online instances based on different criteria:

  • Time-based instances

    They allow a stack to handle loads that follow a predictable pattern by including instances that run only at certain times or on certain days. For example, you could start some instances after 6PM to perform nightly backup tasks or stop some instances on weekends when traffic is lower.

  • Load-based instances

    They allow a stack to handle variable loads by starting additional instances when traffic is high and stopping instances when traffic is low, based on any of several load metrics. For example, you can have AWS OpsWorks Stacks start instances when the average CPU utilization exceeds 80% and stop instances when the average CPU load falls below 60%.

Both time-based and load-based instances are supported for Linux stacks, while only time-based instances are supported for Windows stacks.


A common practice is to use all three instance types together, as follows.

  • A set 24/7 instances to handle the base load. You typically just start these instances and let them run continuously.
  • A set of time-based instances, which AWS OpsWorks Stacks starts and stops to handle predictable traffic variations. For example, if your traffic is highest during working hours, you would configure the time-based instances to start in the morning and shut down in the evening.
  • A set of load-based instances, which AWS OpsWorks Stacks starts and stops to handle unpredictable traffic variations. AWS OpsWorks Stacks starts them when the load approaches the capacity of the stacks' 24/7 and time-based instances, and stops them when the traffic returns to normal..
Using Template: Template Post
magnifier linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram