Repository navigation
Conversation
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.
Summary
Two coupled fixes for the mainnet snapshot full node (
mainnet-indexer-full-node-snapshot-service, ap-northeast-1):snapshot_full_node_ap_northeast_1.tf— theentry_pointpassedvar.s3_snapshot_bucket(mainnet-full-node-snapshots), but for mainnet the bucket resource is created as${local.account_id}-${var.s3_snapshot_bucket}(332066407361-mainnet-full-node-snapshots) per theTODO(IND-457)ins3_bucket.tf. So the task uploaded to a bucket that doesn't exist and failed every cycle withNoSuchBucket(silently — the script'saws s3 cphas|| true). Now referencesaws_s3_bucket.indexer_full_node_snapshots.bucketso the task and the bucket can't drift apart in any env.snapshot_iam.tf— the task's S3 policy wasresources = ["*"](every bucket in the account). Scoped to the snapshot bucket resource ARN (object RW + bucket list).Impact / background
NoSuchBucketfor 8+ days (surfaced while fixing an unrelated credential-leak issue on the same box — see v4-chain#3395, which removedaws s3 cp --debugthat was logging STS session tokens into Datadog).mainnet-indexer-full-node-snapshot-task:81points at332066407361-mainnet-full-node-snapshots, and the live IAM policymainnet-indexer-apne1-ecs_task_s3_policywas scoped to that bucket (version v5). This PR makes both durable — the nextterraform applywill reconcile to the same end state instead of reverting them.Notes
expire-old-snapshotslifecycle rule gated onvar.enable_s3_snapshot_lifecycle— worth confirming it's enabled for mainnet so snapshots don't accumulate.🤖 Generated with Claude Code