Skip to content

Commit 2d2d168

Browse files
Merge branch 'main' into PRM-587
2 parents ffecc16 + b289905 commit 2d2d168

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

infrastructure/lambda-document-upload-check.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ resource "aws_s3_bucket_notification" "document_upload_check_lambda_trigger" {
6060
events = ["s3:ObjectCreated:*"]
6161
filter_prefix = "user_upload"
6262
}
63+
64+
lambda_function {
65+
lambda_function_arn = module.document_upload_check_lambda.lambda_arn
66+
events = ["s3:ObjectCreated:*"]
67+
filter_prefix = "fhir_upload"
68+
}
6369
}
6470

6571
resource "aws_lambda_permission" "document_upload_check_lambda" {
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
module "migration-dynamodb-lambda" {
2+
source = "./modules/lambda"
3+
name = "MigrationDynamoDB"
4+
handler = "handlers.migration_dynamodb_handler.lambda_handler"
5+
6+
iam_role_policy_documents = [
7+
module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document,
8+
module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document,
9+
module.bulk_upload_report_dynamodb_table.dynamodb_read_policy_document,
10+
module.ndr-bulk-staging-store.s3_read_policy_document,
11+
module.ndr-lloyd-george-store.s3_read_policy_document,
12+
aws_iam_policy.ssm_access_policy.policy,
13+
module.ndr-app-config.app_config_policy
14+
]
15+
16+
kms_deletion_window = var.kms_deletion_window
17+
rest_api_id = null
18+
api_execution_arn = null
19+
is_gateway_integration_needed = false
20+
is_invoked_from_gateway = false
21+
22+
lambda_environment_variables = {
23+
WORKSPACE = terraform.workspace
24+
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
25+
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
26+
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
27+
}
28+
29+
lambda_timeout = 900
30+
memory_size = 1024
31+
reserved_concurrent_executions = 200
32+
33+
depends_on = [
34+
module.lloyd_george_reference_dynamodb_table,
35+
module.bulk_upload_report_dynamodb_table,
36+
module.ndr-app-config,
37+
aws_iam_policy.ssm_access_policy,
38+
]
39+
}

0 commit comments

Comments
 (0)