Skip to content

EventBridge → ECS

Captures ECS deployments that happen outside Terraform — Console, CodeDeploy, CLI — and pushes deploy.* Evidence Events.

Code: Evitrus/exportereventbridge-ecs/.

Requirements

  • Terraform ≥ 1.3 and the AWS provider ≥ 5
  • Permission to create a Lambda, an IAM role, and an EventBridge rule
  • A tenant API key with the ingest scope (evt_live_…)

Install guide

hcl
module "evitrus_ecs_events" {
  source = "git::https://github.com/Evitrus/exporter.git//eventbridge-ecs/modules/ecs-eventbridge?ref=main"

  api_key     = var.evitrus_api_key
  ingest_url  = "https://api.evitrus.io/ingest"
  environment = "prod"

  ecs_service_arns = [aws_ecs_service.app.id]
  service_name_map = {
    (aws_ecs_service.app.name) = "payments-api"
  }
}

ecs_service_arns limits the rule to those services. Omit it to receive events for every ECS service in the account and region. service_name_map translates the ECS service name into the Evitrus service name used by the GitHub webhook and other exporters.

Apply creates an EventBridge rule that invokes a Lambda. The Lambda posts to ingest.

Pin ref to a commit or tag when you promote this beyond a first install. ref=main tracks the exporter repository.

Image digests are not on these events. Record the digest from GitHub Actions (or the Ingest API) on the same commit if a Change needs the artifact identity.

What it emits

source is eventbridge. Cluster ARN, service ARN, and deployment id are in metadata.

ECS eventEvidence type
SERVICE_DEPLOYMENT_IN_PROGRESSdeploy.in_progress
SERVICE_DEPLOYMENT_COMPLETEDdeploy.succeeded
SERVICE_DEPLOYMENT_FAILEDdeploy.failed

Evitrus — observability for auditability