Step 2: Create a Stack - AWS OpsWorks

Step 2: Create a 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.

In this step, you use the AWS OpsWorks Stacks console to create a stack. A stack is a collection of instances (such as Amazon EC2 instances) and related AWS resources that have a common purpose and that you want to manage together. (For more information, see Stacks.) There will be only one instance for this walkthrough.

Before you begin this step, complete the prerequisites.

To create the stack
  1. Sign in to the AWS Management Console and open the AWS OpsWorks console at https://console.aws.amazon.com/opsworks/.

  2. Do any of the following, if they apply:

    • If the Welcome to AWS OpsWorks Stacks page is displayed, choose Add your first stack or Add your first AWS OpsWorks Stacks stack (both choices do the same thing). The Add stack page displays.

    • If the OpsWorks Dashboard page is displayed, choose Add stack. The Add stack page displays.

  3. With the Add stack page displayed, choose Sample stack, if it is not already chosen for you.

  4. With Linux already chosen for Operating system type, choose Create stack:

  5. AWS OpsWorks Stacks creates a stack named My Sample Stack (Linux). AWS OpsWorks Stacks also adds all of the necessary components to deploy the app to the stack:

    • A layer, which is a blueprint for a set of instances. It specifies things like the instance's settings, resources, installed packages, and security groups. (For more information, see Layers.) The layer is named Node.js App Server.

    • An instance, which in this case is an Amazon Linux 2 EC2 instance. (For more information about instances, see Instances.) The instance's hostname is nodejs-server1.

    • An app, which is code to run on the instance. (For more information about apps, see Apps.) The app is named Node.js Sample App.

  6. After AWS OpsWorks Stacks creates the stack, choose Explore the sample stack to display the My Sample Stack (Linux) page (if you complete this walkthrough multiple times, My Sample Stack (Linux) may have a sequential number after it, such as 2 or 3):

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