-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: switch from using GSIs to Scan operations for both the response archiver and the nagware lambda functions #726
chore: switch from using GSIs to Scan operations for both the response archiver and the nagware lambda functions #726
Conversation
881fb80
to
3645f19
Compare
3645f19
to
95564f8
Compare
…e archiver and the nagware lambda functions
95564f8
to
424181f
Compare
⚠ Terrform update availableTerraform: 1.9.2 (using 1.6.6)
Terragrunt: 0.62.1 (using 0.54.8) |
Staging: dynamodb✅ Terraform Init: Plan: 0 to add, 1 to change, 0 to destroy Show summary
Show planResource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# aws_dynamodb_table.vault will be updated in-place
~ resource "aws_dynamodb_table" "vault" {
id = "Vault"
name = "Vault"
tags = {}
# (13 unchanged attributes hidden)
- attribute {
- name = "CreatedAt" -> null
- type = "N" -> null
}
- attribute {
- name = "RemovalDate" -> null
- type = "N" -> null
}
- global_secondary_index {
- hash_key = "FormID" -> null
- name = "Status" -> null
- non_key_attributes = [] -> null
- projection_type = "ALL" -> null
- range_key = "Status" -> null
- read_capacity = 0 -> null
- write_capacity = 0 -> null
}
- global_secondary_index {
- hash_key = "Status" -> null
- name = "Archive" -> null
- non_key_attributes = [] -> null
- projection_type = "ALL" -> null
- range_key = "RemovalDate" -> null
- read_capacity = 0 -> null
- write_capacity = 0 -> null
}
- global_secondary_index {
- hash_key = "Status" -> null
- name = "Nagware" -> null
- non_key_attributes = [
- "FormID",
] -> null
- projection_type = "INCLUDE" -> null
- range_key = "CreatedAt" -> null
- read_capacity = 0 -> null
- write_capacity = 0 -> null
}
+ global_secondary_index {
+ hash_key = "FormID"
+ name = "Status"
+ non_key_attributes = []
+ projection_type = "ALL"
+ range_key = "Status"
}
# (6 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.audit_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.reliability_queue"]
WARN - plan.json - main - Missing Common Tags: ["aws_dynamodb_table.vault"]
22 tests, 19 passed, 3 warnings, 0 failures, 0 exceptions
|
Staging: lambdas✅ Terraform Init: Plan: 0 to add, 2 to change, 0 to destroy Show summary
Show planResource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# aws_lambda_function.nagware will be updated in-place
~ resource "aws_lambda_function" "nagware" {
id = "nagware"
tags = {}
~ timeout = 300 -> 900
# (19 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
# aws_lambda_function.response_archiver will be updated in-place
~ resource "aws_lambda_function" "response_archiver" {
id = "response-archiver"
tags = {}
~ timeout = 300 -> 900
# (19 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.audit_logs_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.form_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.nagware_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.reliability_dlq_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_event_rule.response_archiver_lambda_trigger"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.archive_form_templates"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.audit_logs"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.audit_logs_archiver"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.dead_letter_queue_consumer"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.nagware"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.reliability"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.response_archiver"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.submission"]
WARN - plan.json - main - Missing Common Tags: ["aws_cloudwatch_log_group.vault_integrity"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_dynamodb"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_kms"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_logging"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_rds"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_s3"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_secrets"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_sns"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.lambda_sqs"]
WARN -... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Work!
Summary | Résumé
Archive
andNagware
GSIsScan
operations for both the response archiver and the nagware lambda functionslib-dynamodb
instead ofclient-dynamodb
.The goal is to reduce the number of GSIs that need to be updated when a form response if downloaded and/or confirmed. This should reduce our consumption of Write capacity unit on the Vault table, thus preventing our system from being throttled by DynamoDB.