

• The AWS Systems Manager CloudWatch Dashboard will no longer be available after April 30, 2026. Customers can continue to use Amazon CloudWatch console to view, create, and manage their Amazon CloudWatch dashboards, just as they do today. For more information, see [Amazon CloudWatch Dashboard documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html). 

# Create OpsItems
<a name="OpsCenter-create-OpsItems"></a>

After you set up OpsCenter, a tool in AWS Systems Manager, and integrate it with your AWS services, your AWS services automatically create OpsItems based on default rules, events, or alarms. 

You can view the statuses and severity levels of default Amazon EventBridge rules. If required, you can create or edit these rules from Amazon EventBridge. You can also view alarms from Amazon CloudWatch, and create or edit alarms. Using rules and alarms, you can configure events for which you want to generate OpsItems automatically.

When the system creates an OpsItem, it's in the **Open** status. You can change the status to **In progress** when you start investigation of the OpsItem and to **Resolved** after you remediate the OpsItem. For more information about how to configure alarms and rules in AWS services to create OpsItems and how to create OpsItems manually, see the following topics. 

**Topics**
+ [Configure EventBridge rules to create OpsItems](OpsCenter-automatically-create-OpsItems-2.md)
+ [Configure CloudWatch alarms to create OpsItems](OpsCenter-create-OpsItems-from-CloudWatch-Alarms.md)
+ [Create OpsItems manually](OpsCenter-manually-create-OpsItems.md)

# Configure EventBridge rules to create OpsItems
<a name="OpsCenter-automatically-create-OpsItems-2"></a>

When Amazon EventBridge receives an event, it creates a new OpsItem based on default rules. You can create a rule or edit an existing rule to set OpsCenter as the target of an EventBridge event. For information about how to create an event rule, see [Creating a rule for an AWS service](https://docs.aws.amazon.com/eventbridge/latest/userguide/create-eventbridge-rule.html) in the *Amazon EventBridge User Guide*.

**To configure an EventBridge rule to create OpsItems in OpsCenter**

1. Open the Amazon EventBridge console at [https://console.aws.amazon.com/events/](https://console.aws.amazon.com/events/).

1. In the navigation pane, choose **Rules**.

1. On the **Rules** page, for **Event bus**, choose **default**.

1. For **Rules**, choose a rule by selecting the check box next to its name.

1. Select the name of the rule to open its details page. In **Rule details**, verify that **Status** is set to **Enabled**.
**Note**  
If required, you can update the status using **Edit** in the upper-right corner of the page.

1. Choose the **Targets** tab. 

1. On the **Targets** tab, choose **Edit**.

1. For **Target types**, select **AWS service**.

1. For **Select a target**, choose **Systems Manager OpsItem**.

1. For many target types, EventBridge needs permission to send events to the target. In these cases, EventBridge can create the AWS Identity and Access Management (IAM) role needed for your rule to run: 
   + To create an IAM role automatically, choose **Create a new role for this specific resource**.
   + To use an IAM role that you created to give EventBridge permission to create OpsItems in OpsCenter, choose **Use existing role**.

1. In **Additional settings**, for **Configure target input**, choose **Input Transformer**.

   You can use the **Input transformer** option to specify a deduplication string and other important information for OpsItems, such as title and severity.

1. Choose **Configure input transformer**.

1. In **Target input transformer**, for **Input path**, specify the values to parse from the triggering event. For example, to parse the start time, end time, and other details from the event that triggers the rule, use the following JSON.

   ```
   {
       "end-time": "$.detail.EndTime",
       "failure-cause": "$.detail.cause",
       "resources": "$.resources[0]",
       "source": "$.detail.source",
       "start-time": "$.detail.StartTime"
   }
   ```

1. For **Template**, specify the information to send to the target. For example, use the following JSON to pass information to OpsCenter. The information is used to create an OpsItem.
**Note**  
If the input template is in the JSON format, then the object value in the template can't include quotes. For example, the values for resources, failure-cause, source, start time, and end time can't be in quotes. 

   ```
   {
       "title": "EBS snapshot copy failed",
       "description": "CloudWatch Event Rule SSMOpsItems-EBS-snapshot-copy-failed was triggered. Your EBS snapshot copy has failed. See below for more details.",
       "category": "Availability",
       "severity": "2",
       "source": "EC2",
       "operationalData": {
           "/aws/dedup": {
               "type": "SearchableString",
               "value": "{\"dedupString\":\"SSMOpsItems-EBS-snapshot-copy-failed\"}"
           },
           "/aws/automations": {
               "value": "[ { \"automationType\": \"AWS:SSM:Automation\", \"automationId\": \"AWS-CopySnapshot\" } ]"
           },
           "failure-cause": {
               "value": <failure-cause>
           },
           "source": {
               "value": <source>
           },
           "start-time": {
               "value": <start-time>
           },
           "end-time": {
               "value": <end-time>
           },
            },
           "resources": {
               "value": <resources>
           }
       }
   }
   ```

   For more information about these fields, see [Transforming target input](https://docs.aws.amazon.com/eventbridge/latest/userguide/transform-input.html) in the *Amazon EventBridge User Guide*.

1. Choose **Confirm**.

1. Choose **Next**.

1. Choose **Next**.

1. Choose **Update rule**.

After an OpsItem is created from an event, you can view the event details by opening the OpsItem and scrolling down to the **Private operational data** section. For information about how to configure the options in an OpsItem, see [Manage OpsItems](OpsCenter-working-with-OpsItems.md).

# Configure CloudWatch alarms to create OpsItems
<a name="OpsCenter-create-OpsItems-from-CloudWatch-Alarms"></a>

During the integrated setup of OpsCenter, a tool in AWS Systems Manager, you enable Amazon CloudWatch to automatically create OpsItems based on common alarms. You can create an alarm or edit an existing alarm to create OpsItems in OpsCenter. 

CloudWatch creates a new service-linked role in AWS Identity and Access Management (IAM) when you configure an alarm to create OpsItems. The new role is named `AWSServiceRoleForCloudWatchAlarms_ActionSSM`. For more information about CloudWatch service-linked roles, see [Using service-linked roles for CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-service-linked-roles.html) in the *Amazon CloudWatch User Guide*. 

When a CloudWatch alarm generates an OpsItem, the OpsItem displays **CloudWatch alarm - '*alarm\$1name*' is in ALARM state**. 

To view details about a specific OpsItem, choose the OpsItem and then choose the **Related resource details** tab. You can manually edit OpsItems to change details, such as the severity or category. However, when you edit the severity or the category of an alarm, Systems Manager can't update the severity or category of OpsItems that are already created from the alarm. If an alarm created an OpsItem and if you specified a deduplication string, the alarm won't create additional OpsItems even if you edit the alarm in CloudWatch. If the OpsItem is resolved in OpsCenter, CloudWatch will create a new OpsItem.

For more information about configuring CloudWatch alarms, see the following topics.

**Topics**
+ [Configuring a CloudWatch alarm to create OpsItems (console)](OpsCenter-creating-or-editing-existing-alarm-console.md)
+ [Configuring an existing CloudWatch alarm to create OpsItems (programmatically)](OpsCenter-configuring-an-existing-alarm-programmatically.md)

# Configuring a CloudWatch alarm to create OpsItems (console)
<a name="OpsCenter-creating-or-editing-existing-alarm-console"></a>

You can manually create an alarm or update an existing alarm to create OpsItems from Amazon CloudWatch.

**To create a CloudWatch alarm and configure Systems Manager as a target of that alarm**

1. Complete steps 1–9 as specified in [Create a CloudWatch alarm based on a static threshold](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ConsoleAlarms.html) in the *Amazon CloudWatch User Guide*.

1. In the **Systems Manager action ** section, choose **Add Systems Manager OpsCenter action**.

1. Choose **OpsItems**.

1. For **Severity**, choose from 1 to 4. 

1. (Optional) For **Category**, choose a category for the OpsItem.

1. Complete steps 11–13 as specified in [Create a CloudWatch alarm based on a static threshold](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ConsoleAlarms.html) in the *Amazon CloudWatch User Guide*.

1. Choose **Next** and complete the wizard.

**To edit an existing alarm and configure Systems Manager as a target of that alarm**

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. In the navigation pane, choose **Alarms**.

1. Select the alarm, and then choose **Actions**, **Edit**.

1. (Optional) Change settings in the **Metrics** and **Conditions** sections, and then choose **Next**.

1. In the **Systems Manager** section, choose **Add Systems Manager OpsCenter action**. 

1. For **Severity**, choose a number. 
**Note**  
Severity is a user-defined value. You or your organization determine what each severity value means and any service-level agreement associated with each severity.

1. (Optional) For **Category**, choose an option. 

1. Choose **Next** and complete the wizard.

# Configuring an existing CloudWatch alarm to create OpsItems (programmatically)
<a name="OpsCenter-configuring-an-existing-alarm-programmatically"></a>

You can configure Amazon CloudWatch alarms to create OpsItems programmatically by using the AWS Command Line Interface (AWS CLI), AWS CloudFormation templates, or Java code snippets.

**Topics**
+ [Before you begin](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-before-you-begin)
+ [Configuring CloudWatch alarms to create OpsItems (AWS CLI)](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-manually-configure-cli)
+ [Configuring CloudWatch alarms to create or update OpsItems (CloudFormation)](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-programmatically-configure-CloudFormation)
+ [Configuring CloudWatch alarms to create or update OpsItems (Java)](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-programmatically-configure-java)

## Before you begin
<a name="OpsCenter-create-OpsItems-from-CloudWatch-Alarms-before-you-begin"></a>

If you edit an existing alarm programmatically or create an alarm that creates OpsItems, you must specify an Amazon Resource Name (ARN). This ARN identifies Systems Manager OpsCenter as the target for OpsItems created from the alarm. You can customize the ARN so that OpsItems created from the alarm include specific information such as severity or category. Each ARN includes the information described in the following table.


****  

| Parameter | Details | 
| --- | --- | 
|  `Region` (required)  |  The AWS Region where the alarm exists. For example: `us-west-2`. For information about AWS Regions where you can use OpsCenter, see [AWS Systems Manager endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/ssm.html).  | 
|  `account_ID` (required)  |  The same AWS account ID used to create the alarm. For example: `123456789012`. The account ID must be followed by a colon (`:`) and the parameter `opsitem` as shown in the following examples.  | 
|  `severity` (required)  |  A user-defined severity level for OpsItems created from the alarm. Valid values: `1`, `2`, `3`, `4`  | 
|  `Category`(optional)  |  A category for OpsItems created from the alarm. Valid values: `Availability`, `Cost`, `Performance`, `Recovery`, and `Security`.  | 

Create the ARN by using the following syntax. This ARN doesn't include the optional `Category` parameter.

```
arn:aws:ssm:Region:account_ID:opsitem:severity
```

Following is an example.

```
arn:aws:ssm:us-west-2:123456789012:opsitem:3
```

To create an ARN that uses the optional `Category` parameter, use the following syntax.

```
arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name
```

Following is an example.

```
arn:aws:ssm:us-west-2:123456789012:opsitem:3#CATEGORY=Security
```

## Configuring CloudWatch alarms to create OpsItems (AWS CLI)
<a name="OpsCenter-create-OpsItems-from-CloudWatch-Alarms-manually-configure-cli"></a>

This command requires that you specify an ARN for the `alarm-actions` parameter. For information about how to create the ARN, see [Before you begin](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-before-you-begin).

**To configure a CloudWatch alarm to create OpsItems (AWS CLI)**

1. Install and configure the AWS Command Line Interface (AWS CLI), if you haven't already.

   For information, see [Installing or updating the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

1. Run the following command to collect information about the alarm that you want to configure.

   ```
   aws cloudwatch describe-alarms --alarm-names "alarm name"
   ```

1. Run the following command to update an alarm. Replace each *example resource placeholder* with your own information.

   ```
   aws cloudwatch put-metric-alarm --alarm-name name \
   --alarm-description "description" \
   --metric-name name --namespace namespace \
   --statistic statistic --period value --threshold value \
   --comparison-operator value \
   --dimensions "dimensions" --evaluation-periods value \
       --alarm-actions arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name \
   --unit unit
   ```

   Here's an example.

------
#### [ Linux & macOS ]

   ```
   aws cloudwatch put-metric-alarm --alarm-name cpu-mon \
   --alarm-description "Alarm when CPU exceeds 70 percent" \
   --metric-name CPUUtilization --namespace AWS/EC2 \
   --statistic Average --period 300 --threshold 70 \
   --comparison-operator GreaterThanThreshold \
   --dimensions "Name=InstanceId,Value=i-12345678" --evaluation-periods 2 \
   --alarm-actions arn:aws:ssm:us-east-1:123456789012:opsitem:3#CATEGORY=Security \
   --unit Percent
   ```

------
#### [ Windows ]

   ```
   aws cloudwatch put-metric-alarm --alarm-name cpu-mon ^
   --alarm-description "Alarm when CPU exceeds 70 percent" ^
   --metric-name CPUUtilization --namespace AWS/EC2 ^
   --statistic Average --period 300 --threshold 70 ^
   --comparison-operator GreaterThanThreshold ^
   --dimensions "Name=InstanceId,Value=i-12345678" --evaluation-periods 2 ^
   --alarm-actions arn:aws:ssm:us-east-1:123456789012:opsitem:3#CATEGORY=Security ^
   --unit Percent
   ```

------

## Configuring CloudWatch alarms to create or update OpsItems (CloudFormation)
<a name="OpsCenter-create-OpsItems-from-CloudWatch-Alarms-programmatically-configure-CloudFormation"></a>

This section includes AWS CloudFormation templates that you can use to configure CloudWatch alarms to automatically create or update OpsItems. Each template requires that you specify an ARN for the `AlarmActions` parameter. For information about how to create the ARN, see [Before you begin](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-before-you-begin).

**Metric alarm** – Use the following CloudFormation template to create or update a CloudWatch metric alarm. The alarm specified in this template monitors Amazon Elastic Compute Cloud (Amazon EC2) instance status checks. If the alarm enters the `ALARM` state, it creates an OpsItem in OpsCenter. 

```
    {
      "AWSTemplateFormatVersion": "2010-09-09",
      "Parameters" : {
        "RecoveryInstance" : {
          "Description" : "The EC2 instance ID to associate this alarm with.",
          "Type" : "AWS::EC2::Instance::Id"
        }
      },
      "Resources": {
        "RecoveryTestAlarm": {
          "Type": "AWS::CloudWatch::Alarm",
          "Properties": {
            "AlarmDescription": "Run a recovery action when instance status check fails for 15 consecutive minutes.",
            "Namespace": "AWS/EC2" ,
            "MetricName": "StatusCheckFailed_System",
            "Statistic": "Minimum",
            "Period": "60",
            "EvaluationPeriods": "15",
            "ComparisonOperator": "GreaterThanThreshold",
            "Threshold": "0",
            "AlarmActions": [ {"Fn::Join" : ["", ["arn:arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name", { "Ref" : "AWS::Partition" }, ":ssm:", { "Ref" : "AWS::Region" }, { "Ref" : "AWS:: AccountId" }, ":opsitem:3" ]]} ],
            "Dimensions": [{"Name": "InstanceId","Value": {"Ref": "RecoveryInstance"}}]
          }
        }
      }
    }
```

**Composite alarm** – Use the following CloudFormation template to create or update a composite alarm. A composite alarm consists of multiple metric alarms. If the alarm enters the `ALARM` state, it creates an OpsItem in OpsCenter.

```
"Resources":{
       "HighResourceUsage":{
          "Type":"AWS::CloudWatch::CompositeAlarm",
          "Properties":{
             "AlarmName":"HighResourceUsage",
             "AlarmRule":"(ALARM(HighCPUUsage) OR ALARM(HighMemoryUsage)) AND NOT ALARM(DeploymentInProgress)",
             "AlarmActions":"arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name",
             "AlarmDescription":"Indicates that the system resource usage is high while no known deployment is in progress"
          },
          "DependsOn":[
             "DeploymentInProgress",
             "HighCPUUsage",
             "HighMemoryUsage"
          ]
       },
       "DeploymentInProgress":{
          "Type":"AWS::CloudWatch::CompositeAlarm",
          "Properties":{
             "AlarmName":"DeploymentInProgress",
             "AlarmRule":"FALSE",
             "AlarmDescription":"Manually updated to TRUE/FALSE to disable other alarms"
          }
       },
       "HighCPUUsage":{
          "Type":"AWS::CloudWatch::Alarm",
          "Properties":{
             "AlarmDescription":"CPUusageishigh",
             "AlarmName":"HighCPUUsage",
             "ComparisonOperator":"GreaterThanThreshold",
             "EvaluationPeriods":1,
             "MetricName":"CPUUsage",
             "Namespace":"CustomNamespace",
             "Period":60,
             "Statistic":"Average",
             "Threshold":70,
             "TreatMissingData":"notBreaching"
          }
       },
       "HighMemoryUsage":{
          "Type":"AWS::CloudWatch::Alarm",
          "Properties":{
             "AlarmDescription":"Memoryusageishigh",
             "AlarmName":"HighMemoryUsage",
             "ComparisonOperator":"GreaterThanThreshold",
             "EvaluationPeriods":1,
             "MetricName":"MemoryUsage",
             "Namespace":"CustomNamespace",
             "Period":60,
             "Statistic":"Average",
             "Threshold":65,
             "TreatMissingData":"breaching"
          }
       }
    }
```

## Configuring CloudWatch alarms to create or update OpsItems (Java)
<a name="OpsCenter-create-OpsItems-from-CloudWatch-Alarms-programmatically-configure-java"></a>

This section includes Java code snippets that you can use to configure CloudWatch alarms to automatically create or update OpsItems. Each snippet requires that you specify an ARN for the `validSsmActionStr` parameter. For information about how to create the ARN, see [Before you begin](#OpsCenter-create-OpsItems-from-CloudWatch-Alarms-before-you-begin).

**A specific alarm** – Use the following Java code snippet to create or update a CloudWatch alarm. The alarm specified in this template monitors Amazon EC2 instance status checks. If the alarm enters the `ALARM` state, it creates an OpsItem in OpsCenter.

```
import com.amazonaws.services.cloudwatch.AmazonCloudWatch;
    import com.amazonaws.services.cloudwatch.AmazonCloudWatchClientBuilder;
    import com.amazonaws.services.cloudwatch.model.ComparisonOperator;
    import com.amazonaws.services.cloudwatch.model.Dimension;
    import com.amazonaws.services.cloudwatch.model.PutMetricAlarmRequest;
    import com.amazonaws.services.cloudwatch.model.PutMetricAlarmResult;
    import com.amazonaws.services.cloudwatch.model.StandardUnit;
    import com.amazonaws.services.cloudwatch.model.Statistic;
     
    private void putMetricAlarmWithSsmAction() {
        final AmazonCloudWatch cw =
                AmazonCloudWatchClientBuilder.defaultClient();
     
        Dimension dimension = new Dimension()
                .withName("InstanceId")
                .withValue(instanceId);
     
        String validSsmActionStr = "arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name";
     
        PutMetricAlarmRequest request = new PutMetricAlarmRequest()
                .withAlarmName(alarmName)
                .withComparisonOperator(
                        ComparisonOperator.GreaterThanThreshold)
                .withEvaluationPeriods(1)
                .withMetricName("CPUUtilization")
                .withNamespace("AWS/EC2")
                .withPeriod(60)
                .withStatistic(Statistic.Average)
                .withThreshold(70.0)
                .withActionsEnabled(false)
                .withAlarmDescription(
                        "Alarm when server CPU utilization exceeds 70%")
                .withUnit(StandardUnit.Seconds)
                .withDimensions(dimension)
                .withAlarmActions(validSsmActionStr);
     
        PutMetricAlarmResult response = cw.putMetricAlarm(request);
    }
```

**Update all alarms** – Use the following Java code snippet to update all CloudWatch alarms in your AWS account to create OpsItems when an alarm enters the `ALARM` state. 

```
import com.amazonaws.services.cloudwatch.AmazonCloudWatch;
    import com.amazonaws.services.cloudwatch.AmazonCloudWatchClientBuilder;
    import com.amazonaws.services.cloudwatch.model.DescribeAlarmsRequest;
    import com.amazonaws.services.cloudwatch.model.DescribeAlarmsResult;
    import com.amazonaws.services.cloudwatch.model.MetricAlarm;
     
    private void listMetricAlarmsAndAddSsmAction() {
        final AmazonCloudWatch cw = AmazonCloudWatchClientBuilder.defaultClient();
     
        boolean done = false;
        DescribeAlarmsRequest request = new DescribeAlarmsRequest();
     
        String validSsmActionStr = "arn:aws:ssm:Region:account_ID:opsitem:severity#CATEGORY=category_name";
     
        while(!done) {
     
            DescribeAlarmsResult response = cw.describeAlarms(request);
     
            for(MetricAlarm alarm : response.getMetricAlarms()) {
                // assuming there are no alarm actions added for the metric alarm
                alarm.setAlarmActions(ImmutableList.of(validSsmActionStr));
            }
     
            request.setNextToken(response.getNextToken());
     
            if(response.getNextToken() == null) {
                done = true;
            }
        }
    }
```

# Create OpsItems manually
<a name="OpsCenter-manually-create-OpsItems"></a>

When you find an operational issue, you can manually create an OpsItem from OpsCenter, a tool in AWS Systems Manager, to manage and resolve the issue. 

If you set up OpsCenter for cross-account administration, a Systems Manager delegated administrator or AWS Organizations management account can create OpsItems for member accounts. For more information, see [(Optional) Manually set up OpsCenter to centrally manage OpsItems across accounts](OpsCenter-getting-started-multiple-accounts.md).

You can create OpsItems by using the AWS Systems Manager console, the AWS Command Line Interface (AWS CLI), or AWS Tools for Windows PowerShell.

**Topics**
+ [Creating OpsItems manually (console)](OpsCenter-creating-OpsItems-console.md)
+ [Creating OpsItems manually (AWS CLI)](OpsCenter-creating-OpsItems-CLI.md)
+ [Creating OpsItems manually (PowerShell)](OpsCenter-creating-OpsItems-Powershell.md)

# Creating OpsItems manually (console)
<a name="OpsCenter-creating-OpsItems-console"></a>

 You can manually create OpsItems using the AWS Systems Manager console. When you create an OpsItem, it's displayed in your OpsCenter account. If you set up OpsCenter for cross-account administration, OpsCenter provides the delegated administrator or management account with the option to create OpsItems for selected member accounts. For more information, see [(Optional) Manually set up OpsCenter to centrally manage OpsItems across accounts](OpsCenter-getting-started-multiple-accounts.md).

**To create an OpsItem using the AWS Systems Manager console**

1. Open the AWS Systems Manager console at [https://console.aws.amazon.com/systems-manager/](https://console.aws.amazon.com/systems-manager/).

1. In the navigation pane, choose **OpsCenter**.

1. Choose **Create OpsItem**. If you don't see this button, choose the **OpsItems** tab, and then choose **Create OpsItem**.

1.  (Optional) Choose **Other account**, and then choose the account where you want to create the OpsItem. 
**Note**  
This step is required if you're creating OpsItems for a member account. 

1. For **Title**, enter a descriptive name to help you understand the purpose of the OpsItem.

1. For **Source**, enter the type of impacted AWS resource or other source information to help users understand the origin of the OpsItem.
**Note**  
You can't edit the **Source** field after you create the OpsItem.

1. (Optional) For **Priority**, choose the priority level.

1. (Optional) For **Severity**, choose the severity level.

1. (Optional) For **Category**, choose a category.

1. For **Description**, enter information about this OpsItem including (if applicable) steps for reproducing the issue. 
**Note**  
The console supports most markdown formatting in the OpsItem description field. For more information, see [Using Markdown in the Console](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/aws-markdown.html) in the *Getting Started with the AWS Management Console Getting Started Guide.*

1. For **Deduplication string**, enter words that the system can use to check for duplicate OpsItems. For more information about deduplication strings, see [Managing duplicate OpsItems](OpsCenter-working-deduplication.md). 

1. (Optional) For **Notifications**, specify the Amazon Resource Name (ARN) of the Amazon SNS topic where you want notifications sent when this OpsItem is updated. You must specify an Amazon SNS ARN that is in the same AWS Region as the OpsItem.

1. (Optional) For **Related resources**, choose **Add** to specify the ID or ARN of the impacted resource and any related resources.

1. Choose **Create OpsItem**.

If successful, the page displays the OpsItem. When a delegated administrator or management account creates an OpsItem for selected member accounts, the new OpsItems are displayed in the OpsCenter of the administrator and members accounts. For information about how to configure the options in an OpsItem, see [Manage OpsItems](OpsCenter-working-with-OpsItems.md).

# Creating OpsItems manually (AWS CLI)
<a name="OpsCenter-creating-OpsItems-CLI"></a>

The following procedure describes how to create an OpsItem by using the AWS Command Line Interface (AWS CLI).

**To create an OpsItem using the AWS CLI**

1. Install and configure the AWS Command Line Interface (AWS CLI), if you haven't already.

   For information, see [Installing or updating the latest version of the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).

1. Open the AWS CLI and run the following command to create an OpsItem. Replace each *example resource placeholder* with your own information.

   ```
   aws ssm create-ops-item \
       --title "Descriptive_title" \
       --description "Information_about_the_issue" \
       --priority Number_between_1_and_5 \
       --source Source_of_the_issue \
       --operational-data Up_to_20_KB_of_data_or_path_to_JSON_file \
       --notifications Arn="SNS_ARN_in_same_Region" \
       --tags "Key=key_name,Value=a_value"
   ```

   **Specify operational data from a file**

   When you create an OpsItem, you can specify operational data from a file. The file must be a JSON file, and the contents of the file must use the following format.

   ```
   {
     "key_name": {
       "Type": "SearchableString",
       "Value": "Up to 20 KB of data"
     }
   }
   ```

   Here is an example.

   ```
   aws ssm create-ops-item ^
       --title "EC2 instance disk full" ^
       --description "Log clean up may have failed which caused the disk to be full" ^
       --priority 2 ^
       --source ec2 ^
       --operational-data file:///Users/TestUser1/Desktop/OpsItems/opsData.json ^
       --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" ^
       --tags "Key=EC2,Value=Production"
   ```
**Note**  
For information about how to enter JSON-formatted parameters on the command line on different local operating systems, see [Using quotation marks with strings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html) in the *AWS Command Line Interface User Guide*.

   The system returns information like the following.

   ```
   {
       "OpsItemId": "oi-1a2b3c4d5e6f"
   }
   ```

1. Run the following command to view details about the OpsItem that you created.

   ```
   aws ssm get-ops-item --ops-item-id ID
   ```

   The system returns information like the following.

   ```
   {
       "OpsItem": {
           "CreatedBy": "arn:aws:iam::12345678:user/TestUser",
           "CreatedTime": 1558386334.995,
           "Description": "Log clean up may have failed which caused the disk to be full",
           "LastModifiedBy": "arn:aws:iam::12345678:user/TestUser",
           "LastModifiedTime": 1558386334.995,
           "Notifications": [
               {
                   "Arn": "arn:aws:sns:us-west-1:12345678:TestUser"
               }
           ],
           "Priority": 2,
           "RelatedOpsItems": [],
           "Status": "Open",
           "OpsItemId": "oi-1a2b3c4d5e6f",
           "Title": "EC2 instance disk full",
           "Source": "ec2",
           "OperationalData": {
               "EC2": {
                   "Value": "12345",
                   "Type": "SearchableString"
               }
           }
       }
   }
   ```

1. Run the following command to update the OpsItem. This command changes the status from `Open` (the default) to `InProgress`.

   ```
   aws ssm update-ops-item --ops-item-id ID --status InProgress
   ```

   The command has no output.

1. Run the following command again to verify that the status changed to `InProgress`.

   ```
   aws ssm get-ops-item --ops-item-id ID
   ```

## Examples of creating an OpsItem
<a name="OpsCenter_creating_OpsItems-CLI_examples"></a>

The following code examples show you how to create an OpsItem by using the Linux management portal, macOS, or Windows Server. 

**Linux management portal or macOS**

The following command creates an OpsItem when an Amazon Elastic Compute Cloud (Amazon EC2) instance disk is full. 

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"EC2":{"Value":"12345","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" \
    --tags "Key=EC2,Value=ProductionServers"
```

The following command uses the `/aws/resources` key in `OperationalData` to create an OpsItem with an Amazon DynamoDB related resource.

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"/aws/resources":{"Value":"[{\"arn\": \"arn:aws:dynamodb:us-west-2:12345678:table/OpsItems\"}]","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-2:12345678:TestUser"
```

The following command uses the `/aws/automations` key in `OperationalData` to create an OpsItem that specifies the `AWS-ASGEnterStandby` document as an associated Automation runbook.

```
aws ssm create-ops-item \
    --title "EC2 instance disk full" \
    --description "Log clean up may have failed which caused the disk to be full" \
    --priority 2 \
    --source ec2 \
    --operational-data '{"/aws/automations":{"Value":"[{\"automationId\": \"AWS-ASGEnterStandby\", \"automationType\": \"AWS::SSM::Automation\"}]","Type":"SearchableString"}}' \
    --notifications Arn="arn:aws:sns:us-west-2:12345678:TestUser"
```

**Windows**

The following command creates an OpsItem when an Amazon Relational Database Service (Amazon RDS) instance is not responding. 

```
aws ssm create-ops-item ^
    --title "RDS instance not responding" ^
    --description "RDS instance not responding to ping" ^
    --priority 1 ^
    --source RDS ^
    --operational-data={\"RDS\":{\"Value\":\"abcd\",\"Type\":\"SearchableString\"}} ^
    --notifications Arn="arn:aws:sns:us-west-1:12345678:TestUser1" ^
    --tags "Key=RDS,Value=ProductionServers"
```

The following command uses the `/aws/resources` key in `OperationalData` to create an OpsItem with an Amazon EC2 instance related resource.

```
aws ssm create-ops-item ^
    --title "EC2 instance disk full" ^
    --description "Log clean up may have failed which caused the disk to be full" ^
    --priority 2 ^
    --source ec2 ^
    --operational-data={\"/aws/resources\":{\"Value\":\"[{\\"""arn\\""":\\"""arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0\\"""}]\",\"Type\":\"SearchableString\"}}
```

The following command uses the `/aws/automations` key in `OperationalData` to create an OpsItem that specifies the `AWS-RestartEC2Instance` runbook as an associated Automation runbook.

```
aws ssm create-ops-item ^
    --title "EC2 instance disk full" ^
    --description "Log clean up may have failed which caused the disk to be full" ^
    --priority 2 ^
    --source ec2 ^
    --operational-data={\"/aws/automations\":{\"Value\":\"[{\\"""automationId\\""":\\"""AWS-RestartEC2Instance\\”"",\\"""automationType\\""":\\"""AWS::SSM::Automation\\"""}]\",\"Type\":\"SearchableString\"}}
```

# Creating OpsItems manually (PowerShell)
<a name="OpsCenter-creating-OpsItems-Powershell"></a>

The following procedure describes how to create an OpsItem by using AWS Tools for Windows PowerShell. 

**To create an OpsItem using AWS Tools for Windows PowerShell**

1. Open AWS Tools for Windows PowerShell and run the following command to specify your credentials. 

   ```
   Set-AWSCredentials –AccessKey key-name –SecretKey key-name
   ```

1. Run the following command to set the AWS Region for your PowerShell session.

   ```
   Set-DefaultAWSRegion -Region Region
   ```

1. Run the following command to create a new OpsItem. Replace each *example resource placeholder* with your own information. This command specifies a Systems Manager Automation runbook for remediating this OpsItem. 

   ```
   $opsItem = New-Object Amazon.SimpleSystemsManagement.Model.OpsItemDataValue
   $opsItem.Type = [Amazon.SimpleSystemsManagement.OpsItemDataType]::SearchableString 
   $opsItem.Value = '[{\"automationId\":\"runbook_name\",\"automationType\":\"AWS::SSM::Automation\"}]'
   $newHash = @{" /aws/automations"=[Amazon.SimpleSystemsManagement.Model.OpsItemDataValue]$opsItem}
   
   New-SSMOpsItem `
       -Title "title" `
       -Description "description" `
       -Priority priority_number `
       -Source AWS_service `
       -OperationalData $newHash
   ```

   If successful, the command outputs the ID of the new OpsItem.

The following example specifies the Amazon Resource Name (ARN) of an impaired Amazon Elastic Compute Cloud (Amazon EC2) instance.

```
$opsItem = New-Object Amazon.SimpleSystemsManagement.Model.OpsItemDataValue
$opsItem.Type = [Amazon.SimpleSystemsManagement.OpsItemDataType]::SearchableString 
$opsItem.Value = '[{\"arn\":\"arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0\"}]'
$newHash = @{" /aws/resources"=[Amazon.SimpleSystemsManagement.Model.OpsItemDataValue]$opsItem}
New-SSMOpsItem -Title "EC2 instance disk full still" -Description "Log clean up may have failed which caused the disk to be full" -Priority 2 -Source ec2 -OperationalData $newHash
```