Step 3.3: Add the Custom Cookbooks to MyStack
Important
The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers.
We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post
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.
-
Click Stack in the navigation pane to see the page for the current stack.
-
Click Stack Settings, and then click Edit.
-
Modify the stack configuration as follows:
-
Use custom Chef Cookbooks – Yes
-
Repository type – Git
-
Repository URL –
git://github.com/amazonwebservices/opsworks-example-cookbooks.git
-
-
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.