Repository navigation
Add S3 table for submission events - #2308
Open
theseanything wants to merge 3 commits into
Open
theseanything wants to merge 3 commits into
theseanything wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The deployment role lacks the S3 Tables and Glue write permissions required to apply these resources.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds S3 Tables infrastructure for querying form submission events through Athena.
Changes:
- Creates an Iceberg
submission_eventstable and supporting bucket/namespace. - Federates S3 Tables into Glue.
- Enables analytics in the health deployment.
| File | Description |
|---|---|
infra/modules/analytics/variables.tf |
Defines the environment input. |
infra/modules/analytics/main.tf |
Defines analytics resource names. |
infra/modules/analytics/s3-tables.tf |
Creates the bucket, namespace, and table. |
infra/modules/analytics/glue-catalog.tf |
Configures Glue federation. |
infra/modules/analytics/outputs.tf |
Exports bucket identifiers. |
infra/deployments/forms/health/analytics.tf |
Instantiates the analytics module. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Athena and Firehose can only reach S3 Tables through the "s3tablescatalog" Glue catalog. There can be only one per account and region, and it covers every table bucket in the account, so it belongs with the other account-wide resources rather than in the module that creates a table bucket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theseanything
force-pushed
the
submission-events-s3-table
branch
from
October 7, 2026 14:29
fc8f0a1 to
35f4912
Compare
The health pipeline will create the analytics S3 table bucket, namespace and table, but the deployer role only has read access to S3 Tables. The permissions are scoped to this environment's analytics table bucket. The statement is in forms_infra_1 rather than next to s3 in forms_infra_2 because forms_infra_2 is close to the 6,144 character managed policy limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theseanything
force-pushed
the
submission-events-s3-table
branch
from
October 7, 2026 14:33
35f4912 to
2380734
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
theseanything
force-pushed
the
submission-events-s3-table
branch
from
October 7, 2026 14:41
2380734 to
64957e9
Compare
| # it covers every table bucket in the account, not just the one in this module. | ||
| # Access control is IAM-based (IAM_ALLOWED_PRINCIPALS), so consumers need IAM | ||
| # permissions only, no Lake Formation grants. | ||
| resource "aws_glue_catalog" "s3tablescatalog" { |
This branch has not been 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.

What problem does this pull request solve?
Trello card: https://trello.com/c/b3cNvzu5/3136-record-kpis
We want data about submission events so we can measure our KPIs. This is the first step. It creates:
formsnamespacesubmission_eventstableIt also connects S3 Tables to the Glue Data Catalog so that Athena can query them.
Things to consider when reviewing
forms/accountbecause each account and region can only have one, and it covers every table bucket in the account. IAM controls access (IAM_ALLOWED_PRINCIPALS), so we do not need Lake Formation grants.Reminders
This pull request changes the deployer role (
modules/deployer-access) and adds the Glue catalog toforms/account. No pipeline applies these changes.