# Amazon Cloudwatch (AWS) Integration

Follow these steps to configure a service and seamlessly transfer related alert data from CloudWatch.

Squadcast will process the information and create incidents based on your preferences.

## Using Amazon CloudWatch as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4fbd74e7ca0b30173c47a1d58ed6a0804a0465aa%2FAlert_Sources.png?alt=media&#x26;token=aaca6610-9d18-4dd4-9cf5-320042f326f1" alt="How to configure Amazon Cloudwatch integration in Squadcast" width="563"><figcaption></figcaption></figure>

2\. Select **Amazon CloudWatch**. Copy the displayed **Webhook URL** to [<mark style="color:blue;">configure</mark>](#create-a-squadcast-webhook-in-amazon-cloudwatch) it within **Amazon CloudWatch.** Finish by clicking **Add Alert Source** -> **Done**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-d10e0838a9822aad72d1811aacebdf44d895d3df%2FAmazon_cloudwatch_image1.png?alt=media" alt="Steps to add Amazon CloudWatch integration to a service in Squadcast" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %} <mark style="color:orange;">**Important**</mark>**:**

When an alert source turns <mark style="color:green;">Active</mark>, it’ll show up under Configured Alert Sources. You can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source.\
\
An Alert Source is <mark style="color:green;">active</mark> if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

## Create a Squadcast Webhook in Amazon CloudWatch

1. Now log in to your AWS account and proceed to SNS.
2. Click on "**Create topic**" to configure the display name and related details. Fill in the details as per your requirements and then click on "Create topic".

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-aff00a37526f3c9b44732cd3bfe8bac9ecbb4e54%2Faws_2.png?alt=media&#x26;token=ae94cbba-6faa-4709-97df-ac1a786b139c" alt="Create a Squadcast Webhook in Amazon CloudWatch - Topic Configuration: Fill in Details and Create Topic" width="563"><figcaption></figcaption></figure>

3. Now inside the topic, click on "**Create subscription**" to get "Create subscription" page. Select the protocol as "HTTPS" and in the endpoint enter the URL that was copied from Squadcast. Finally, click on "Create subscription" to create the subscription.

{% hint style="warning" %}
**Important**

Ensure that the `Enable raw message Delivery` checkbox remains unchecked.
{% endhint %}

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-26313c2e0eb75eaa2bde9db8a9e52cfa4c61d654%2Faws_3.png?alt=media&#x26;token=161a03d4-5295-4d7f-893d-562438f9d2db" alt="Create Subscription - Configure HTTPS Protocol and Enter Squadcast Endpoint URL for Notification Delivery" width="563"><figcaption></figcaption></figure>

4. The "**Subscription ID**" for the subscription should immediately change from "PendingConfirmation" to "Confirmed". Click on the refresh button to verify the same.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-d8929bfd47af0706e3178ad8fcc09e68346d5955%2Faws_4.png?alt=media&#x26;token=7c8c8bda-5dcc-424c-9a92-0415150325b6" alt="Verify Subscription Status - Refresh to Confirm Change from &#x22;PendingConfirmation&#x22; to &#x22;Confirmed&#x22;" width="563"><figcaption></figcaption></figure>

5. Now you can go to any of your AWS services for which you want to set the Alarm. We'll take the example of "EC2" in this case.
6. Right-click on your EC2 instance and go to "**CloudWatch Monitoring**". Click on "**Add/Edit Alarms**".

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-45ba4b2909388ec814270579712c5c3b357cd3c2%2Faws_5.png?alt=media&#x26;token=7eb66bff-53b6-492a-8a0d-3f0f6c47bcfb" alt="Add/Edit Alarms in EC2 - CloudWatch Monitoring - AWS Services" width="563"><figcaption></figcaption></figure>

7. Click on "**Create Alarm**" and in the following dialog box for the "Send a notification to" drop-down, select the topic you created earlier. Configure the alarm as per your requirements and finally click on "**Create Alarm**". Now you will start receiving incidents on Squadcast whenever this Alarm moves to the "**ALARM" state**.

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-1457eb2016c8fe6cdbbc142259a5fc57ae241eff%2Faws_6.png?alt=media&#x26;token=62ae8386-a83f-4136-b2c4-c29a6ee2f4fe" alt="Configure Alarm and Topic in CloudWatch for Squadcast Notifications" width="563"><figcaption></figcaption></figure>

8. Under "**Actions**", add a notification selecting "**Whenever this alarm: State is OK**" and "Send notification to:" as the topic you created earlier. Finally, click on "**Save Changes**".

<figure><img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-f294a00802ab1bc12708300acf70666fc033d311%2Faws_7.png?alt=media&#x26;token=98e113b0-b9ca-4797-9a96-624e4b1d95ee" alt="Configure Notification Actions for CloudWatch Alarm" width="563"><figcaption></figcaption></figure>

Your Amazon CloudWatch Integration is now good to go!

* Whenever an Alarm moves to OK state inside CloudWatch the corresponding incident will **automatically be resolved** in Squadcast.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.squadcast.com/integrations/alert-source-integrations-native/amazon_cloudwatch_aws.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
