From b7e201f3d47e088d71f66381f01d9ad05e727710 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Wed, 11 Feb 2026 09:46:45 +0000 Subject: [PATCH] redploy my lambda without list and see if it works --- backend/address2UPRN/main.py | 2 +- backend/condition/condition_trigger_request.py | 2 +- backend/postcode_splitter/main.py | 1 - infrastructure/terraform/shared/main.tf | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/address2UPRN/main.py b/backend/address2UPRN/main.py index 293ce3d9..2cc604cb 100644 --- a/backend/address2UPRN/main.py +++ b/backend/address2UPRN/main.py @@ -335,7 +335,7 @@ def get_uprn( address = top_rank_df["address"].values[0] lexiscore = float(top_rank_df["lexiscore"].values[0]) - epc = top_rank_df["current-energy-rating"].values[0] + epc = top_rank_df["current-energy-efficiency"].values[0] score = float(top_rank_df["lexiscore"].values[0]) # logger.info(f"Address found to be: {address}, with lexiscore {lexiscore}") diff --git a/backend/condition/condition_trigger_request.py b/backend/condition/condition_trigger_request.py index 03bd6ad1..daa82949 100644 --- a/backend/condition/condition_trigger_request.py +++ b/backend/condition/condition_trigger_request.py @@ -29,5 +29,5 @@ class ConditionTriggerRequest(BaseModel): # { # "file_type": "LBWF", # "trigger_file_bucket": "condition-data-dev", -# "trigger_file_key": "input/lbwf/LBWF - Example Asset Data September 2025.xlsx", +# "trigger_file_key": "input/lbwf/LBWF - Example Asset Data September 2025.xlsx" # } diff --git a/backend/postcode_splitter/main.py b/backend/postcode_splitter/main.py index 5a63d920..06a9d1a3 100644 --- a/backend/postcode_splitter/main.py +++ b/backend/postcode_splitter/main.py @@ -23,7 +23,6 @@ def parse_s3_uri(s3_uri: str) -> tuple[str, str]: Supports two formats: 1. S3 URI format: s3://bucket/key - 2. AWS console URL: https://account-id-hash.region.console.aws.amazon.com/s3/object/bucket?region=...&prefix=path """ logger.info("Parsing S3 URI") diff --git a/infrastructure/terraform/shared/main.tf b/infrastructure/terraform/shared/main.tf index 83845185..5e189dc9 100644 --- a/infrastructure/terraform/shared/main.tf +++ b/infrastructure/terraform/shared/main.tf @@ -366,7 +366,7 @@ module "postcode_splitter_s3_read" { policy_name = "PostcodeSplitterReadS3" policy_description = "Allow postcode splitter Lambda to read from retrofit-data bucket" bucket_arns = ["arn:aws:s3:::retrofit-data-${var.stage}"] - actions = ["s3:GetObject", "s3:ListBucket"] + actions = ["s3:GetObject"] resource_paths = ["/*"] }