Step 3: Add a Layer to the Stack - AWS OpsWorks

Step 3: Add a Layer to the Stack

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.

A layer is a blueprint for a set of instances, such as Amazon EC2 instances. It specifies information such as the instance's settings, resources, installed packages, and security groups. Next, add a layer to the stack. (For more information about layers, see Layers.)

To add the layer to the stack
  1. With the MyLinuxDemoStack page displayed from the previous step, for Layers, choose Add a layer:

    Layers section with icon and description, highlighting "Add a layer" option.

  2. The Add Layer page is displayed. On the OpsWorks tab, for Name, type MyLinuxDemoLayer. (You can type a different name, but be sure to substitute it for MyLinuxDemoLayer throughout this walkthrough.)

  3. For Short name, type demo (you can type a different value, but be sure to substitute it for demo throughout this walkthrough):

    Form to add a layer with fields for name and short name, and options for OpsWorks, ECS, and RDS.

  4. Choose Add layer. AWS OpsWorks Stacks creates the layer and displays the Layers page.

  5. On the Layers page, for MyLinuxDemoLayer, choose Network.

  6. On the Network tab, under Automatically Assign IP Addresses, verify that Public IP addresses is set to yes. If you've made changes, choose Save.

    Network settings showing Public IP addresses set to yes and Elastic IP addresses set to No.
  7. On the Layers page, choose Security:

    AWS Layers interface showing MyLinuxDemoLayer with Security tab highlighted.

  8. The Layer MyLinuxDemoLayer page is displayed with the Security tab open. For Security groups, choose AWS-OpsWorks-WebApp, and then choose Save:

    Security settings interface showing security group selection and EC2 instance profile options.

  9. The AWS-OpsWorks-WebApp security group is added to the layer. (This security group enables users to connect to the app on the instance later in this walkthrough. Without this security group, users will receive a message in their web browser that they cannot connect to the instance.)

You now have a layer with the correct settings for this walkthrough.

In the next step, you will specify the app to deploy to the instance.