Real-AWS deploy composition for recently-interacted-topk - #53
Open
pequalsnp wants to merge 1 commit into
Open
Conversation
Lands the prep work needed to start the v1 real-AWS soak documented in STABILITY.md. One terraform apply stands up the multi-source TopK example end to end and exercises the load-bearing experimental code paths (Lambda Kinesis runtime, processor core, Kafka per-partition concurrency). pipeline-counter additions: - New dedup_enabled flag: provisions <name>_dedup (pk:S, native TTL on ttl), grants worker + bootstrap RW on it, injects DDB_DEDUP_TABLE into all three task envs. Exposed as dedup_table_arn / dedup_table_name outputs so sibling modules share the same table. New pipeline-lambda-kinesis module: - Kinesis data stream (or BYO via kinesis_stream_arn). - Lambda function: provided.al2, arm64 by default, deployment-zip driven, content-hashed via filebase64sha256 so re-builds are cache-friendly. - Event-source mapping: BatchItemFailures, bisect_batch_on_function_error, caller-tunable batch_size / parallelization_factor / starting_position (LATEST / TRIM_HORIZON / AT_TIMESTAMP for bootstrap-to-live handoff). - IAM: AWSLambdaBasicExecutionRole + Kinesis consumer perms + DDB state RW + optional dedup RW + optional SQS/SNS on-failure dest. - CloudWatch log group with caller-controlled retention. examples/recently-interacted-topk/terraform/: - Composes the two modules; one terraform apply stands up the whole topology. - CloudWatch alarms: Lambda Errors / IteratorAge / Throttles, DDB WriteThrottles on state + dedup, Kinesis WriteThrottles. All route to alarm_sns_topic_arn when set. - terraform.tfvars.example with placeholder values. - README.md: prerequisites → image build → Lambda zip → apply → smoke test → observability → teardown. Includes order-of-magnitude cost notes for a low-volume soak. Both modules validate clean (terraform validate) and pass terraform fmt -recursive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Lands the prep work needed to start the v1 real-AWS soak documented in
STABILITY.md. Oneterraform applystands up the multi-source TopK example end to end and exercises the experimental code paths that need operational evidence before promotion (Lambda Kinesis runtime, processor core, Kafka per-partition concurrency).What this adds
pipeline-counteradditions:dedup_enabledflag — provisions<name>_dedup(pk:S hash, native TTL onttl), grants worker + bootstrap RW, injectsDDB_DEDUP_TABLEenv var into all three tasks. Exposed asdedup_table_arn/dedup_table_nameoutputs so sibling modules share the same table.New
pipeline-lambda-kinesismodule:kinesis_stream_arn).provided.al2, arm64 by default, deployment-zip driven, content-hashed viafilebase64sha256.BatchItemFailures+bisect_batch_on_function_error; tunablebatch_size/parallelization_factor/starting_position(supportsAT_TIMESTAMPfor bootstrap-to-live handoff).AWSLambdaBasicExecutionRole+ Kinesis consumer perms + DDB state RW + optional dedup RW + optional SQS/SNS on-failure destination.examples/recently-interacted-topk/terraform/:Errors/IteratorAge/Throttles, DDBWriteThrottleson state + dedup, KinesisWriteProvisionedThroughputExceeded. All route toalarm_sns_topic_arnwhen set.terraform.tfvars.example+ runbook (prereqs → image build → Lambda zip → apply → smoke test → observability → teardown). Includes rough cost notes (~$100/mo for a low-volume soak).Test plan
terraform validateon both modules and the example composition.terraform fmt -check -recursive deploy/terraform examples/recently-interacted-topk/terraform.validateis necessary but not sufficient.GetWindowreturns the merged Top-N).Follow-ups (separate PRs)
local) AWS for at least one full quarter" clock starts on apply.pkg/exec/processor+pkg/exec/lambda/{kinesis,dynamodbstreams,sqs}+pkg/source/kafkatomostly stableonce the soak is uneventful.🤖 Generated with Claude Code