Custom AWS OpsWorks Stacks Layers
The custom layer has the following configuration settings.
(Required) The layer's name, which is used for display purposes.
- Short name
(Required) The layer's short name, which is used internally and by recipes. It can have a maximum of 200 characters, which are limited to the lowercase alphanumeric characters and the following punctuation marks:
- Security groups
This setting appears if you chose to not automatically associate a built-in AWS OpsWorks Stacks security group with your layers. You must specify which security group to associate with the layer. For more information, see Create a New Stack.
AWS OpsWorks Stacks automatically installs Ruby on the layer's instances. If you want to run Ruby code on the instance but don't want to use the default Ruby version, you can use custom JSON or a custom attributes file to specify your preferred version. For more information, see Ruby Versions.
The basic procedure for creating a custom layer has the following steps:
Implement a cookbook that contains the recipes and associated files required to install and configure packages, handle configuration changes, deploy apps, and so on.
Depending on your requirements, you might also need recipes to handle undeployment and shutdown tasks. For more information, see Cookbooks and Recipes.
Create a custom layer.
Assign your recipes to the appropriate lifecycle events.
You then add instances to the layer, start them, and deploy apps to those instances.
To deploy apps to a custom layer's instances, you must implement recipes to handle the deploy operation and assign them to the layer's Deploy event.