<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql" -->

---
title: Enabling ECS Events with Terraform | daily.dev
description: AWS introduced a console feature called ECS Event Capture that shows and queries event history for Elastic Container Service clusters, but it has no API, so...
canonical: https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Enabling ECS Events with Terraform | daily.dev
og:description: AWS introduced a console feature called ECS Event Capture that shows and queries event history for Elastic Container Service clusters, but it has no API, so...
og:url: https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql
og:image: https://api.daily.dev/og/posts/38MMTkDQL.png
og:image:alt: Enabling ECS Events with Terraform
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling ECS Events with Terraform

**[Svix Blog](https://daily.dev/sources/svix)** · 4 min read · 0 upvotes · 0 comments

## Summary

AWS introduced a console feature called ECS Event Capture that shows and queries event history for Elastic Container Service clusters, but it has no API, so Terraform can't manage it out of the box. The post reverse-engineers the console's un-minified helpers.tsx to find that the CloudWatch event rule name requires a base58-encoded SHA-256 hash of the cluster ARN, then builds a custom Terraform provider (terraform-provider-base58) to compute that hash. A full Terraform module is provided that creates the CloudWatch log group, event rule, event target, and IAM resource policy needed to replicate what the console does, enabling ECS Event Capture entirely through Terraform.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.svix.com/blog/enabling-ecs-events-with-terraform>

## Questions this post answers

### How do I enable AWS ECS Event Capture using Terraform since there's no official API for it?

Recreate the three resources the console creates manually: a CloudWatch log group named /aws/events/ecs/containerinsights/${cluster_name}/performance, a CloudWatch event rule named EventsToLogs-${first6charsOfClusterName}-${base58sha256hash}, and an event target linking the rule to the log group. The hash is a base58-encoded SHA-256 digest of the quoted cluster ARN string, computable via a custom Terraform provider since no native Terraform function supports base58 encoding.

_Developers wiring up AWS infra with Terraform can track workarounds like this ECS event capture setup on daily.dev._

### How is the AWS ECS console's EventBridge rule name for Event Capture generated?

It follows the pattern EventsToLogs-${clusterPrefix}-${hash}, where clusterPrefix is the first six characters of the cluster name and hash is a base58-encoded SHA-256 digest computed from the double-quoted cluster ARN string. This logic was found by reading AWS's un-minified helpers.tsx file shipped in the console's frontend JavaScript.

_Engineers debugging undocumented AWS console behavior can find similar reverse-engineering writeups on daily.dev._

## Similar posts on daily.dev

- [Amazon ECS now publishes AWS CloudTrail data events for insight into API activities](https://daily.dev/posts/amazon-ecs-now-publishes-aws-cloudtrail-data-events-for-insight-into-api-activities-mg6vzfihg) · AWS · 0 upvotes · 0 comments
- [Amazon ECS now provides Action Logs for deployment and orchestration visibility](https://daily.dev/posts/amazon-ecs-now-provides-action-logs-for-deployment-and-orchestration-visibility-tznnrlzfi) · AWS · 0 upvotes · 0 comments
- [Terraform AWS Provider Continues Rapid Expansion as AWS Infrastructure Becomes More Complex](https://daily.dev/posts/terraform-aws-provider-continues-rapid-expansion-as-aws-infrastructure-becomes-more-complex-usumjflcc) · InfoQ · 0 upvotes · 0 comments
- [Designing a Scalable, Secure & AI-Powered Property Management Platform on AWS](https://daily.dev/posts/designing-a-scalable-secure-ai-powered-property-management-platform-on-aws-sdu6ieozs) · Medium · 0 upvotes · 0 comments

---

Tags: [#aws](https://daily.dev/tags/aws), [#terraform](https://daily.dev/tags/terraform), [#iac](https://daily.dev/tags/iac), [#aws-cloudwatch](https://daily.dev/tags/aws-cloudwatch)

[View this post on daily.dev](https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Enabling ECS Events with Terraform","url":"https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql"},"datePublished":"2026-08-23T07:20:23.467Z","dateModified":"2026-08-23T07:22:22.648Z","description":"AWS introduced a console feature called ECS Event Capture that shows and queries event history for Elastic Container Service clusters, but it has no API, so...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fc7eade1e5f8e9ea2e9dc2abe8e822e3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/fc7eade1e5f8e9ea2e9dc2abe8e822e3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Svix Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Svix Blog","logo":"https://media.daily.dev/image/upload/s--Shf9MlOr--/f_auto,q_auto/v1787469609/logos/svix?_a=BAMAMicg0","url":"https://daily.dev/sources/svix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"aws,terraform,iac,aws-cloudwatch","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Svix Blog","item":"https://daily.dev/sources/svix"},{"@type":"ListItem","position":3,"name":"Enabling ECS Events with Terraform"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/enabling-ecs-events-with-terraform-38mmtkdql#faq","mainEntity":[{"@type":"Question","name":"How do I enable AWS ECS Event Capture using Terraform since there's no official API for it?","acceptedAnswer":{"@type":"Answer","text":"Recreate the three resources the console creates manually: a CloudWatch log group named /aws/events/ecs/containerinsights/${cluster_name}/performance, a CloudWatch event rule named EventsToLogs-${first6charsOfClusterName}-${base58sha256hash}, and an event target linking the rule to the log group. The hash is a base58-encoded SHA-256 digest of the quoted cluster ARN string, computable via a custom Terraform provider since no native Terraform function supports base58 encoding. Developers wiring up AWS infra with Terraform can track workarounds like this ECS event capture setup on daily.dev."}},{"@type":"Question","name":"How is the AWS ECS console's EventBridge rule name for Event Capture generated?","acceptedAnswer":{"@type":"Answer","text":"It follows the pattern EventsToLogs-${clusterPrefix}-${hash}, where clusterPrefix is the first six characters of the cluster name and hash is a base58-encoded SHA-256 digest computed from the double-quoted cluster ARN string. This logic was found by reading AWS's un-minified helpers.tsx file shipped in the console's frontend JavaScript. Engineers debugging undocumented AWS console behavior can find similar reverse-engineering writeups on daily.dev."}}]}
```

