Cookbook Basics
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 can use cookbooks to accomplish a wide variety of tasks. The following topics assume that you are new to Chef, and describe how to use cookbooks to accomplish some common tasks. Because Test Kitchen does not yet support Windows, the examples are all for Linux, with notes indicating how to adapt them for Windows. If you are new to Chef, we recommend going through these examples, even if you will be working with Windows. Most of the examples in this topic can be used on Windows instances with some modest changes, which are noted in the examples. All of the examples run in a virtual machine, so you don't even need to have a Linux computer. Just install Vagrant and Test Kitchen on your regular workstation.
Note
If you want to run these recipes on a Windows instance, the simplest approach is to create a Windows stack and run the recipes on one of the stack's instances. For more information on how to run recipes on an AWS OpsWorks Stacks Windows instance, see Running a Recipe on a Windows Instance.
Before continuing, make sure that you have installed Vagrant and Test Kitchen, and gone through their Getting Started walkthroughs. For more information, see Vagrant and Test Kitchen.