Skip to content

Commit 645981a

Browse files
committed
copy shared
1 parent c1cccf8 commit 645981a

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

lambdas/id_sync.Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ RUN mkdir -p /home/appuser && \
77
chown -R 1001:1001 /home/appuser && pip install "poetry~=1.5.0"
88

99
# Install Poetry dependencies
10-
# Copy shared Poetry files first
11-
COPY shared/poetry.lock shared/pyproject.toml shared/README.md ./shared/
1210
# Copy id_sync Poetry files
1311
COPY id_sync/poetry.lock id_sync/pyproject.toml id_sync/README.md ./
12+
# Copy shared/src/common to ./src/common
13+
COPY shared/src/common ./src/common
14+
15+
RUN echo "Listing /var/task after source code copy:" && ls -R /var/task
1416

1517
# Install id_sync dependencies
1618
WORKDIR /var/task
@@ -35,4 +37,4 @@ RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
3537
USER 1001:1001
3638

3739
# Set the Lambda handler
38-
CMD ["id_sync.handler"]
40+
CMD ["id_sync.handler"]

terraform/id_sync_lambda.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22
locals {
33
lambdas_dir = abspath("${path.root}/../lambdas")
4-
shared_dir = abspath("${path.root}/../lambdas/shared")
5-
id_sync_lambda_dir = abspath("${path.root}/../lambdas/id_sync")
4+
shared_dir = "${local.lambdas_dir}/shared"
5+
id_sync_lambda_dir = "${local.lambdas_dir}/id_sync"
66

77
# Get files from both directories
88
shared_files = fileset(local.shared_dir, "**")
@@ -314,11 +314,11 @@ resource "aws_cloudwatch_log_group" "id_sync_log_group" {
314314
resource "aws_lambda_event_source_mapping" "id_sync_sqs_trigger" {
315315
event_source_arn = "arn:aws:sqs:eu-west-2:${var.immunisation_account_id}:${local.short_prefix}-id-sync-queue"
316316
function_name = aws_lambda_function.id_sync_lambda.arn # TODO
317-
317+
318318
# Optional: Configure batch size and other settings
319319
batch_size = 10
320320
maximum_batching_window_in_seconds = 5
321-
321+
322322
# Optional: Configure error handling
323323
function_response_types = ["ReportBatchItemFailures"]
324-
}
324+
}

0 commit comments

Comments
 (0)