Step 3.3: Add the Custom Cookbooks to MyStack - AWS OpsWorks

Step 3.3: Add the Custom Cookbooks to MyStack

Important

AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

You store custom cookbooks in a repository, much like apps. Each stack can have a repository that contains one set of custom cookbooks. You then direct AWS OpsWorks Stacks to install your custom cookbooks on the stack's instances.

  1. Click Stack in the navigation pane to see the page for the current stack.

  2. Click Stack Settings, and then click Edit.

  3. Modify the stack configuration as follows:

    • Use custom Chef CookbooksYes

    • Repository typeGit

    • Repository URLgit://github.com/amazonwebservices/opsworks-example-cookbooks.git

  4. Click Save to update the stack configuration.

AWS OpsWorks Stacks then installs the contents of your cookbook repository on all of the stack's instances. If you create new instances, AWS OpsWorks Stacks automatically installs the cookbook repository.

Note

If you need to update any of your cookbooks, or add new cookbooks to the repository, you can do so without touching the stack settings. AWS OpsWorks Stacks will automatically install the updated cookbooks on all new instances. However, AWS OpsWorks Stacks does not automatically install updated cookbooks on the stack's online instances. You must explicitly direct AWS OpsWorks Stacks to update the cookbooks by running the Update Cookbooks stack command. For more information, see Run Stack Commands.