Repository navigation
fix(infra): remove the impersonation metric filter — its log group refuses filters (#1302) - #1303
Merged
Merged
Conversation
…fuses filters (#1302) #1293's filter on /er/{env}/containers was refused in dev and prod (PutMetricFilter: only supported on the Standard log class); that group is Infrequent Access by the P4 cost decision, so the infra workflow on main would keep failing on it. The filter and its alarm come out; the failure rate and spot interruption alarms stay. The BFF's er.audit.impersonation line remains for #1301 to count through a Standard-class route. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
terraform plan
Warning This plan DESTROYS resources in: dev prod. Merging applies it unattended. dev — 0 to add, 0 to change, 1 to DESTROYmodule.eks.data.aws_iam_policy_document.node_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_caller_identity.current: Reading...
data.aws_rds_engine_version.aurora_pg: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=1725605485]
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_iam_openid_connect_provider.github: Reading...
data.aws_region.current: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.obs_pod_trust: Reading...
data.aws_iam_policy_document.efs_csi_trust: Reading...
module.network.data.aws_region.current: Reading...
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.obs_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.er_api_pod_trust: Reading...
data.aws_iam_policy_document.er_api_pod_trust: Read complete after 0s [id=819195744]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=4006586444]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.otel_collector: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=3111493560]
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=4017345831]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=2921565705]
data.aws_iam_policy_document.bedrock_invoke: Reading...
data.aws_iam_policy_document.bedrock_invoke: Read complete after 0s [id=3601248236]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_iam_policy_document.ci_deploy_dev: Reading...
data.aws_iam_policy_document.ci_deploy_dev: Read complete after 0s [id=1754478413]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_dev_trust: Reading...
data.aws_iam_policy_document.ci_deploy_dev_trust: Read complete after 0s [id=4060172364]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# module.operations.aws_cloudwatch_metric_alarm.impersonation_volume[0] will be destroyed
# (because aws_cloudwatch_metric_alarm.impersonation_volume is not in configuration)
- resource "aws_cloudwatch_metric_alarm" "impersonation_volume" {
- actions_enabled = true -> null
- alarm_actions = [
- "arn:aws:sns:us-east-2:797781631727:er-alerts",
] -> null
- alarm_description = "More than 20 impersonation events (start, stop or impersonated mutation) in an hour. Read erweb.audit for who and which org; operators impersonate to support a tenant, so a burst is either an incident being worked or a compromised operator session." -> null
- alarm_name = "er-dev-impersonation-volume" -> null
- arn = "arn:aws:cloudwatch:us-east-2:797781631727:alarm:er-dev-impersonation-volume" -> null
- comparison_operator = "GreaterThanThreshold" -> null
- datapoints_to_alarm = 0 -> null
- evaluation_interval = 0 -> null
- evaluation_periods = 1 -> null
- id = "er-dev-impersonation-volume" -> null
- metric_name = "er.audit.impersonations" -> null
- namespace = "ER/Dev" -> null
- ok_actions = [
- "arn:aws:sns:us-east-2:797781631727:er-alerts",
] -> null
- period = 3600 -> null
- region = "us-east-2" -> null
- statistic = "Sum" -> null
- tags_all = {
- "Environment" = "dev"
- "ManagedBy" = "terraform"
- "Project" = "entity-resolution"
} -> null
- threshold = 20 -> null
- treat_missing_data = "notBreaching" -> null
# (4 unchanged attributes hidden)
}
Plan: 0 to add, 0 to change, 1 to destroy.
prod — 0 to add, 0 to change, 1 to DESTROYdata.aws_iam_policy_document.efs_csi_trust: Reading...
module.eks.data.aws_iam_policy_document.cluster_trust: Reading...
data.aws_caller_identity.current: Reading...
data.aws_iam_policy_document.eso_trust: Reading...
data.aws_iam_policy_document.efs_csi_trust: Read complete after 0s [id=819195744]
module.eks.data.aws_iam_policy_document.cluster_trust: Read complete after 0s [id=1029077455]
data.aws_iam_policy_document.eso_trust: Read complete after 0s [id=819195744]
data.aws_rds_engine_version.aurora_pg: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Reading...
module.eks.data.aws_iam_policy_document.node_trust: Read complete after 0s [id=2851119427]
data.aws_iam_policy_document.pod_trust: Reading...
data.aws_iam_policy_document.pod_trust: Read complete after 0s [id=819195744]
module.ses.data.aws_region.current: Reading...
module.network.data.aws_availability_zones.available: Reading...
data.aws_iam_openid_connect_provider.github: Reading...
module.network.data.aws_region.current: Reading...
module.ses.data.aws_region.current: Read complete after 0s [id=us-east-2]
module.network.data.aws_region.current: Read complete after 0s [id=us-east-2]
data.aws_caller_identity.current: Read complete after 0s [id=797781631727]
data.aws_iam_policy_document.fluent_bit: Reading...
data.aws_iam_policy_document.fluent_bit: Read complete after 0s [id=2978074842]
data.aws_iam_policy_document.otel_collector: Reading...
data.aws_iam_policy_document.api_contract_bucket: Reading...
data.aws_iam_policy_document.api_contract_bucket: Read complete after 0s [id=1127163522]
data.aws_iam_policy_document.otel_collector: Read complete after 0s [id=1193716550]
module.lake.data.aws_iam_policy_document.lake_tls_only: Reading...
module.lake.data.aws_iam_policy_document.lake_tls_only: Read complete after 0s [id=2453399085]
data.aws_iam_policy_document.ci_deploy_prod_api_contract: Reading...
data.aws_iam_policy_document.ci_deploy_prod_api_contract: Read complete after 0s [id=3801820449]
data.aws_iam_policy_document.eso: Reading...
data.aws_iam_policy_document.eso: Read complete after 0s [id=2178872705]
data.aws_iam_policy_document.openobserve: Reading...
data.aws_iam_policy_document.openobserve: Read complete after 0s [id=2652188337]
module.ses.data.aws_iam_policy_document.send: Reading...
module.ses.data.aws_iam_policy_document.send: Read complete after 0s [id=3767633194]
data.aws_iam_policy_document.lake_access: Reading...
data.aws_iam_policy_document.lake_access: Read complete after 0s [id=1033619361]
module.network.data.aws_availability_zones.available: Read complete after 0s [id=us-east-2]
data.aws_rds_engine_version.aurora_pg: Read complete after 0s [id=17.9]
data.aws_iam_openid_connect_provider.github: Read complete after 0s [id=arn:aws:iam::797781631727:oidc-provider/token.actions.githubusercontent.com]
data.aws_iam_policy_document.ci_deploy_prod: Reading...
data.aws_iam_policy_document.ci_deploy_prod: Read complete after 1s [id=2891227359]
data.aws_iam_policy_document.ci_deploy_prod_trust: Reading...
data.aws_iam_policy_document.ci_deploy_prod_trust: Read complete after 0s [id=4060172364]
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# module.operations.aws_cloudwatch_metric_alarm.impersonation_volume[0] will be destroyed
# (because aws_cloudwatch_metric_alarm.impersonation_volume is not in configuration)
- resource "aws_cloudwatch_metric_alarm" "impersonation_volume" {
- actions_enabled = true -> null
- alarm_actions = [
- "arn:aws:sns:us-east-2:797781631727:er-alerts",
] -> null
- alarm_description = "More than 20 impersonation events (start, stop or impersonated mutation) in an hour. Read erweb.audit for who and which org; operators impersonate to support a tenant, so a burst is either an incident being worked or a compromised operator session." -> null
- alarm_name = "er-prod-impersonation-volume" -> null
- arn = "arn:aws:cloudwatch:us-east-2:797781631727:alarm:er-prod-impersonation-volume" -> null
- comparison_operator = "GreaterThanThreshold" -> null
- datapoints_to_alarm = 0 -> null
- evaluation_interval = 0 -> null
- evaluation_periods = 1 -> null
- id = "er-prod-impersonation-volume" -> null
- metric_name = "er.audit.impersonations" -> null
- namespace = "ER/Prod" -> null
- ok_actions = [
- "arn:aws:sns:us-east-2:797781631727:er-alerts",
] -> null
- period = 3600 -> null
- region = "us-east-2" -> null
- statistic = "Sum" -> null
- tags_all = {
- "Environment" = "prod"
- "ManagedBy" = "terraform"
- "Project" = "entity-resolution"
} -> null
- threshold = 20 -> null
- treat_missing_data = "notBreaching" -> null
# (4 unchanged attributes hidden)
}
Plan: 0 to add, 0 to change, 1 to destroy.
|
athvin
temporarily deployed
to
marketing-preview
November 27, 2026 03:54 — with
GitHub Actions
Inactive
8 of 9 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1302
Remove
aws_cloudwatch_log_metric_filter.impersonationand its alarm (with their variables and tests); correct the observability skill; regenerate the footprint.The infra workflow on main failed in both envs on that filter (run 45933961412): the containers log group is Infrequent Access and refuses metric filters. #1301 re-scopes the alarm.
Proof
terraform validateandterraform test(2 passed) in the module; skills regen + check. The PR's plan shows the removal only.Risk & rollback
Removes resources that were never created. Reverting re-breaks the infra workflow.
Post-merge ledger
Closed by: agent · session
Claude Code:24d16c2e-fec6-49d8-9797-060338df4848onMac· 2026-11-27T04:01:18Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
f76b16ec— rust 45936844360, frontend 45936844343, infra 45936844362 successimagesbuilt, or correctly never ran because nothing that goes intoan image changed: n/a — Terraform and a skill only; no image input changed
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: n/a for the app; the infra workflow applied in dev and prod (45936844362 success), destroying only the stateless impersonation alarm
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: infra green again on main; drift/kind red for known reasons (Confirm the er-alerts email subscription and prove alert delivery #1056, kind probe red since 2026-11-10: KeyError 'token_hash' after the credential-omission fix #1106)
Donethrough the automation rather than byhand, and the issue closed: Infra on main fails since #1293: the impersonation metric filter targets an Infrequent-Access log group #1302 CLOSED via the merge
(a skill, a reference, memory) — or nothing new was learned: the observability skill now says the containers group is Infrequent Access and refuses metric filters
Specific to this change
describe-alarmsreads back er-{dev,prod}-attempt-failure-rate and er-{dev,prod}-spot-interruptionsContext — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
🤖 Generated with Claude Code