Connect AWS CloudWatch

AWS CloudWatch is a data source for error budgets. Agile Analytics reads your metrics every 30 minutes and measures each SLO against them. If you already have SLOs in CloudWatch Application Signals, Agile Analytics can import those too — and if you use CloudWatch RUM, it can measure what your real users experienced.

settings-15-add-data-source

1. Create an access key

  1. In the AWS console, open IAM → Users and create a user for Agile Analytics, for example agile-analytics-slo, without console access.
  2. Attach the CloudWatchReadOnlyAccess policy. Nothing else is needed: Agile Analytics only reads, and this policy also lets it read your Application Signals SLOs.
  3. Open the user, go to Security credentials → Create access key, choose Third-party service, and copy the Access key ID and the Secret access key. AWS shows the secret once.

2. Add the data source

  1. In Agile Analytics, go to Settings → Error Budgets, press Add Data Source and choose AWS CloudWatch.
  2. Give it a name, enter the access key ID and secret, and choose the region your metrics and SLOs are in, for example eu-central-1. For more than one region, add a data source per region.
  3. Press Test to check the credentials, then Save.

3. Add services and SLOs

Continue on the Error budgets page: Error budgets. You can:

  • Import SLOs that already exist in CloudWatch Application Signals. Choose Import from AWS when you add an SLO. Agile Analytics lists the SLOs in the data source's account and region. See Importing SLOs from Google Cloud or AWS.
  • Define SLOs in Agile Analytics on your CloudWatch metrics.

4. Measure what your real users experienced

If you use CloudWatch RUM, Agile Analytics can set an SLO on what visitors actually experienced in the browser — not on what your servers reported.

Nothing extra is needed in AWS. CloudWatch RUM publishes its app monitors to CloudWatch itself, so the read access you already gave covers it.

  1. On the Error budgets page, add an SLO and choose your AWS data source.
  2. Turn on Real user monitoring.
  3. Pick the app monitor. The list comes from your own account, so there is no name to type.
  4. Press Availability or Latency to start from a complete SLO, or tick the metrics yourself. Everything in the good column is counted as a good event and everything in the bad column as a bad one, so “errors” can be JavaScript errors and 5xx responses together.
  5. Set the goal, for example 95%, and save.

rum-01-fields

What the metrics mean

MetricCounts
PageViewCountpage views
SessionCountsessions
JsErrorCountJavaScript errors in the browser
Http4xxCount / Http5xxCountfailed requests the page made
NavigationSatisfiedTransactionnavigations under 2 seconds
NavigationToleratedTransactionnavigations between 2 and 8 seconds
NavigationFrustratedTransactionnavigations over 8 seconds

The two and eight seconds are AWS's thresholds, not ours, and they cannot be changed in CloudWatch RUM. That is also what makes a latency SLO possible here without percentiles: RUM has already sorted every navigation into satisfied, tolerated and frustrated, which is a good/bad ratio. Agile Analytics says so next to the field.

What to expect

  • An hour with no visitors is not a perfect hour. A period in which your app monitor saw nothing is left out of the error budget rather than counted as 100%. A quiet night does not earn you budget.
  • Good against bad only. A RUM SLO has no percentile, because CloudWatch RUM publishes no distribution to cut. Agile Analytics will not let you save a percentile SLO on RUM.
  • Per service, per team. A RUM SLO belongs to a service like any other, so it appears in the service's error budget, in its team's roll-up and in the health score with no further setup.
  • Several regions. An app monitor is readable in the region it was created in, so use the data source for that region.

Replacing the key

Enter the new key on the existing card and press Update backend. An invalid or rotated key shows up as a failed last job on the Error budgets page, and the SLOs stop updating until it is replaced.