Skip to content

Commit 476c4c5

Browse files
NRL-721 Add kms perms to lambda policy
1 parent f630602 commit 476c4c5

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

scripts/reset_sandbox_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def reset_sandbox_table(table_name: str, pointers_per_type: int = 2):
3737
print("Step 2: Seeding with fresh pointer data...")
3838
try:
3939
result = seed_sandbox_table(table_name, pointers_per_type, force=True)
40-
print(f"\n=== ✓ Reset Complete ===")
40+
print("\n=== ✓ Reset Complete ===")
4141
print(
4242
f"Table '{table_name}' has been reset with {result['successful']} fresh pointers"
4343
)

scripts/seed_sandbox_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _generate_and_write_pointers(
166166

167167
for pointer_type, template in templates.items():
168168
for custodian in CUSTODIANS:
169-
for i in range(pointers_per_type):
169+
for _ in range(pointers_per_type):
170170
counter += 1
171171

172172
try:

terraform/account-wide-infrastructure/modules/seed_sandbox_lambda/iam.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ resource "aws_iam_role_policy" "seed_sandbox_additional_permissions" {
4242
"dynamodb:BatchWriteItem"
4343
]
4444
Resource = [for table_name in var.table_names : "arn:aws:dynamodb:${var.region}:*:table/${table_name}"]
45+
},
46+
{
47+
Effect = "Allow"
48+
Action = [
49+
"kms:Decrypt",
50+
"kms:DescribeKey"
51+
]
52+
Resource = "*"
4553
}
4654
]
4755
})

0 commit comments

Comments
 (0)