Extending a Layer - AWS OpsWorks

Extending a Layer

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 or through AWS Premium Support.

Sometimes, you need to customize a built-in layer beyond what can be handled by modifying AWS OpsWorks Stacks attributes or customizing templates. For example, suppose you need to create symlinks, set file or folder modes, install additional packages, and so on. You must extend custom layers to provide more than minimal functionality. In that case, you will need to implement one or more custom cookbooks with recipes to handle the customization tasks. This topic provides some examples of how to use recipes to extend a layer.

If you are new to Chef, you should first read Cookbooks 101, which is a tutorial that introduces the basics of how to implement cookbooks to perform a variety of common tasks. For a detailed example of how to implement a custom layer, see Creating a Custom Tomcat Server Layer.