How to use AWS OpsWorks?

Are you preparing for AWS Certified Solutions Architect Professional certification exam? In this space, we are writing series of articles on topics which are covered in the Solutions Architect Professional certification exam. In this article, we are explaining one of the important service available with Amazon web services which is  AWS Opswork. You would expect lot of questions from this topic for Solutions Architect Professional exam. You can subscribe to us for receiving the further updates on this topic.

AWS Opsworks Chef Automation Tool

The AWS Opswork topic addresses the Deployment Management domain mentioned in the below table and as highlighted in the AWS Blueprint for the exam guide

AWS Certified Solutions Architect Professional BluePrint

What is Opsworks?

AWS OpsWorks is a configuration management service that helps you configure and operate applications in a cloud enterprise by using Chef. AWS OpsWorks Stacks and AWS OpsWorks for Chef Automate let you use Chef cook books and solutions for configuration management.

What are AWS Opsworks stacks?

AWS OpsWorks Stacks, the original service, provides a simple and flexible way to create and manage stacks and applications. AWS OpsWorks Stacks lets you deploy and monitor applications in your stacks. You can create stacks that help you manage cloud resources in specialized groups called layers.

A layer represents a set of EC2 instances that serve a particular purpose, such as serving applications or hosting a database server. Layers depend on Chef recipes to handle tasks such as installing packages on instances, deploying apps, and running scripts.

What are AWS Opsworks layers?

Every stack contains one or more layers, each of which represents a stack component, such as a load balancer or a set of application servers.

As you work with OpsWorks layers, the following should be adhered to

  • Each layer in a stack must have at least one instance and can optionally have multiple instances.
  • Each instance in a stack must be a member of at least one layer, except for registered instances.

You cannot configure an instance directly, except for some basic settings such as the SSH key and hostname. You must create and configure an appropriate layer, and add the instance to the layer.

AWS OpsWorks Stacks provides three ways to manage the number of server instances.

  • 24/7 instancesare started manually and run until they are manually stopped.
  • Time-based instancesare automatically started and stopped by AWS OpsWorks Stacks on a user-specified schedule.
  • Load-based instancesare automatically started and stopped by AWS OpsWorks Stacks when they cross a threshold for a user-specified load metric such as CPU or memory utilization.

Following are the recommendations given by AWS from a security perspective

  • First and foremost, it is recommend that you do not use your account’s root credentials to access AWS resources.

Instead, create IAM users for your employees and attach policies that provide appropriate access. Each employee can then use their IAM user credentials to access resources.

  • Employees should have permissions to access only those resources that they need to perform their jobs. For example, application developers need to access only the stacks that run their applications.
  • Employees should have permissions to use only those actions that they need to perform their jobs. An application developer might need full permissions for a development stack and permissions to deploy their apps to the corresponding production stack. They probably do not need permissions to start or stop instances on the production stack, create or delete layers, and so on.

AWS has the following recommendations for updating instances

  • Create and start new instances to replace your current online instances. Then delete the current instances. The new instances will have the latest set of security patches installed during setup.
  • On Linux-based instances in Chef 11.10 or older stacks, run the Update Dependencies stack command, which installs the current set of security patches and other updates on the specified instances.

Creating an Opswork stack

Let’s now go through the steps which can be used to create an Opswork stack.

Step 1: Log into the aws console. Go to the Management Tools section->OpsWorks.

Goto Management Tools and select OpsWorks

Step 2: Click on Go to OpsWorks stacks

Go to OpsWorks stacks

Step 3: Click on ‘Add your first stack’

Click on ‘Add your first stack’

Step 4: Choose the sample stack, choose the operating system you desired and click on ‘Create stack’

Choose sample stack, OS and then click on Create Stack

Step 5: Click on ‘Explore the sample stack’ in the next screen.

Explore the Sample Stack

You will then see the details of the stack in the next screen.

Stack Details

To start the instance for the stack, got to the Instances section.

For the nodejs-server1 , click on the start button to start the instance.

Start Server Instance

Once the instance in online, you should be able to see the status of the server in the online state.

Server Status is online

Now if you go to the Public IP, and open it in the web browser you should get the following page

Open public IP and see Sample Page

So this shows that you have deployed your first OpsWork stack.

Step 6: If you want to assign an Elastic IP to your stack, then go to the Layers section.

Layers section

Click on the Network section

You can turn on Elastic IP from here

Turn on Elastic IP

Final Points to Remember about Opswork

  • AWS OpsWorks is a configuration management service that helps you configure and operate applications in a cloud enterprise by using Chef.
  • AWS OpsWorks Stacks, the original service, provides a simple and flexible way to create and manage stacks and applications
  • Each layer in a stack must have at least one instance and can optionally have multiple instances.
  • Each instance in a stack must be a member of at least one layer, except for registered instances
  • For updating instances in stacks – Create and start new instances to replace your current online instances. Then delete the current instances. The new instances will have the latest set of security patches installed during setup. On Linux-based instances in Chef 11.10 or older stacks, run the Update Dependencies stack command, which installs the current set of security patches and other updates on the specified instances.

Summary

In this article we have explained about AWS Opswork. This is the Configuration management service offered by the AWS which is used to configure the server . You would expect lot of questions from this topic in your certification exam. 

If you are preparing for the AWS certifications exam and looking for any help, please send us a mail or call to our customer support team.

 

 

About Pavan Gumaste

Pavan Rao is a programmer / Developer by Profession and Cloud Computing Professional by choice with in-depth knowledge in AWS, Azure, Google Cloud Platform. He helps the organisation figure out what to build, ensure successful delivery, and incorporate user learning to improve the strategy and product further.

1 thought on “How to use AWS OpsWorks?”

  1. Hello I have a whizlabs account. I have passed the Solutions Architect Associate exam, thanks in part to Whizlabs. I am now working toward the AWS CSyOp Admin Associate exam.

    I have purchased the SysOp AA course and practice tests but am looking for additional help. Specifically, help on questions from the practice exam, and other materials that could be on the test. OpsWorks, Kinesis, and Lambda

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top