# AWS CloudWatch & Better Stack integration

This integration allows you to create Uptime incidents from AWS CloudWatch automatically.

## Connect AWS CloudWatch and Uptime

1.  Go to **Integrations** → [Importing data](https://uptime.betterstack.com/team/0/integrations/importing-data ";_blank").
2.  Find the **AWS CloudWatch** card and click **Add**.
3.  Name your integration (e.g., "Backend service") and click **Save changes**.
4.  Copy the **Endpoint URL**.

### In AWS SNS

1.  In your AWS console, go to **Simple Notification Service (SNS)** → **Topics** → **Create topic**.
2.  Enter a **Topic name** (e.g., `UptimeCloudWatchTopic`) and click **Create topic**.
3.  Go to **Subscriptions** → **Create subscription**.
4.  For **Topic ARN**, select the topic you just created.
5.  For **Protocol**, select **HTTPS**.
6.  For **Endpoint**, paste the URL you copied from Better Stack.
7.  Click **Create subscription**. AWS will send a confirmation request to our webhook, and we will confirm it automatically.

### In AWS CloudWatch

1.  Go to **CloudWatch** → **Alarms** and select the alarm you want to configure.
2.  Click **Edit**.
3.  In **Step 2: Configure actions**, add two notification actions:
    *   One for the **In alarm** state.
    *   One for the **OK** state.
4.  For both actions, select the SNS topic you created earlier.
5.  Click **Update alarm**.

You're done. 🎉
