DEV Community

Vadym Kazulkin for AWS Community Builders

Posted on • Edited on

Amazon DevOps Guru for the Serverless applications - Part 1 Introduction to DevOps Guru

Introduction

In this blog post series I would like to introduce you the Amazon DevOps Guru service, explain its functionality and value and show you its benefits especially in the context of the application based on AWS Serverless services (API Gateway, DynamoDB, Lambda, SQS, Kinesis, Step Functions and others). I'll show you how to configure DevOps Guru, then we'll setup experiments on the concrete example application which lead to the operational issues and see whether DevOps Guru recognizes them and creates insights.
In the first part of the series I'd like to give you an introduction about Amazon DevOps Guru service in general. So let's start our journey.

What is Amazon DevOps Guru

Amazon DevOps Guru is a service powered by machine learning (ML). DevOps Guru helps detect behaviors that deviate from normal operating patterns so you can identify operational issues in the following categories long before they impact your customers

  • increased latency
  • error rates (timeouts, throttles, reaching service quotas)
  • resource constraints (exceeding AWS account limits)

DevOps Guru also provides proactive insights with recommendations to help you avoid operational issues that might affect your application in the future. Using DevOps Guru, you can monitor your applications for performance and operational issues — no manual setup or ML expertise required.

Benefits of using DevOps Guru

1) Proactively identify and address operational issues

Use DevOps Guru for to proactively detect application issues and receive recommendations to help correct and rectify the issue before a customer-impacting event occurs. These proactive insights are created by analyzing operational data and application metrics with ML algorithms that can identify early signs of future operational issues.

For instance, for Serverless applications if the provisioned concurrency is set too low for a Lambda-based application stack, DevOps Guru generates a proactive insight indicating concurrency spillover invocation. This insight provides high-level information, which includes the insight description, severity, status, and number of affected applications. Also included is a recommendation to increase the provisioned concurrency to keep the utilization balanced.

2) Optimize application performance

Especially Serverless application benefits from it, as DevOps Guru integrates with Amazon CodeGuru Profiler so you can more easily trace application performance issues to the underlying code responsible, and resolve issues faster. For instance, when a Lambda function creates an SDK service client for every invocation (hence increasing execution time) CodeGuru Profiler alerts to this code inefficiency, which is then displayed in DevOps Guru as a proactive insight.

3) Easily deploy and integrate with AWS services and third-party tools

Activate DevOps Guru for your applications with one click in the AWS Management Console or a single API call. When the service detects an operational issue, it displays its findings in the DevOps Guru console and sends notifications through Amazon EventBridge and Amazon Simple Notification Service (SNS). You can then automatically manage and take real-time action on operational issues before they become customer-impacting outages. DevOps Guru provides integrations to the following incident management tools

  • AWS own System Manager OPsCenter
  • PagerDuty
  • Atlassian Opsgenie

This picture explains in detail how DevOps Guru service works

Image description

Setting up Amazon DevOps Guru

If you use AWS Organizations please read the article How to easily configure DevOps Guru across your organization with Systems Manager Quick Setup.

To setup DevOps Guru please roceed with the following:

Determine coverage for DevOps Guru:

Use one of the following methods to specify the resources in your operational solutions.

  • Choose to have your AWS Region and account define your coverage boundary. With this option, DevOps Guru analyzes all resources in your account and Region. This is a good option to choose if you use your account for only one application.

  • Use AWS CloudFormation stacks to define the resources in your operational application. AWS CloudFormation templates define and generate your resources for you. Specify the stacks that create your application resources when you configure DevOps Guru. You can update your stacks at any time. All of the resources in the stacks that you choose define your boundary coverage. For more information, see Using AWS CloudFormation stacks to identify resources in your DevOps Guru applications.

  • Use AWS tags to specify AWS resources in your applications. DevOps Guru analyzes only the resources that contain the tags you choose. Those resources make up your boundary. An AWS tag consists of a tag key and a tag value. You can specify one tag key and you can specify one or more values with that key. Use one value for all the resources in one of your applications. If you have multiple applications, then use a tag with the same key for all of them, and group the resources into your applications using the tags' values. All of the resources with the tags that you choose make up the coverage boundary for DevOps Guru.

Here is the example where we selected the Cloudformation stack with the name "DevOpsGuruDemoProductsApi" to be analyzed by the DevOps Guru

Image description

Conclusion

In the first article of the series I introduced you to the Amazon DevOps Guru service, explained its functionality and benefits and explained how to set it up. In the next article I'll introduce our sample Serverless application and explain how to setup our experiments which will provoke anomalies and see whether DevOps Guru recognizes them and creates insights. We'll also run those experiments starting with the Amazon DynamoDB and continuing with other AWS Serverless services in the upcoming articles.

Top comments (0)