> For the complete documentation index, see [llms.txt](https://ysfang82.gitbook.io/development-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ysfang82.gitbook.io/development-notes/aws-notes/service/deployment/ops-works.md).

# OpsWorks

**Introduction**

* Managed Chef, Puppet for resources in the same region.
* Good for migrating when Chef / Puppet are already in use
* An alternative to AWS SSM
* If needs a deeper infrastructure control, use CloudFormation instead.

**Feature**

* For configuration, deployment, management with IaC
* Chef uses Recipes of Cookbooks to configure instances.
  * Stack (per top-level application)
  * Layer (1+ instnaces, can create more layers if need to separate modules)
  * Custom Recipe (per database)
* Puppet uses manifests.
* Supports auto-healing for resources.
* Options for [managing Linux Security Updates](https://docs.aws.amazon.com/opsworks/latest/userguide/workingsecurity-updates.html)
  * Create new instances to replace current instances.
  * On Linux-based instances in Chef 11.10 or older stacks, run the `Update Dependencies` stack command.
* [Elastic Beanstalk vs CloudFormation vs OpsWorks vs CodeDeploy](https://tutorialsdojo.com/aws-cheat-sheet-elastic-beanstalk-vs-cloudformation-vs-opsworks-vs-codedeploy/)
* [OpsWorks Stacks provides 3 ways to manage the number of server instances.](https://docs.aws.amazon.com/opsworks/latest/userguide/best-practices-autoscale.html)
  * [24/7 instances](https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-starting.html) are started manually and run until they are manually stopped.
  * [Time-based instances](https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-autoscaling.html) are automatically started and stopped by AWS OpsWorks Stacks on a user-specified schedule.
  * [Load-based instances](https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-autoscaling.html) are automatically started and stopped by AWS OpsWorks Stacks when they cross a threshold for a user-specified load metric such as CPU or memory utilization.
