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
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
-
With the MyLinuxDemoStack page displayed from the previous step, for Layers, choose Add a layer:
-
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 forMyLinuxDemoLayer
throughout this walkthrough.) -
For Short name, type
demo
(you can type a different value, but be sure to substitute it fordemo
throughout this walkthrough): -
Choose Add layer. AWS OpsWorks Stacks creates the layer and displays the Layers page.
-
On the Layers page, for MyLinuxDemoLayer, choose Network.
-
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.
-
On the Layers page, choose Security:
-
The Layer MyLinuxDemoLayer page is displayed with the Security tab open. For Security groups, choose AWS-OpsWorks-WebApp, and then choose Save:
-
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.