First, a caveat: I learned this on EC2 instances and make no promises that it will work in any other setup. That said:
- The recipe runlist is not anywhere in your custom cookbooks, it’s in the layer settings for each layer in your stack.
- If you add a new cookbook, recipes absolutely have to go in the recipes folder under the [cookbookname] folder.
- Data that your recipe expects, such as “node[‘datadog’][‘jmx’][‘instances’]” must exist in an attributes file or your stack settings or something, but doesn’t necessarily have to have a value. The structure just needs to exist with the expected names.
- Cookbooks have metadata (metadata.md) where you define the version number of your cookbook and which other cookbooks it depends on. You can optionally list the recipes inside the cookbook but you don’t have to.
- If you update your cookbook you can update that cookbook on your instances without redeploying them by running the Update Custom Cookbooks command from your stack (the run command button is beside the stack settings button on the “Stack” page for your stack).
- Once you’ve updated your cookbook you can run your updated recipes almost the same way, just select “Execute Recipes” instead of “Update Custom Cookbooks” in the dropdown and put a list of recipes to execute in the field below the dropdown.