1- module "get_routing_config_lambda " {
1+ module "create_routing_config_lambda " {
22 source = " https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.22/terraform-lambda.zip"
33
44 project = var. project
@@ -9,11 +9,11 @@ module "get_routing_config_lambda" {
99
1010 kms_key_arn = var. kms_key_arn
1111
12- function_name = " get -routing-config"
12+ function_name = " create -routing-config"
1313
14- function_module_name = " get -routing-config"
14+ function_module_name = " create -routing-config"
1515 handler_function_name = " handler"
16- description = " Get Routing Config API endpoint"
16+ description = " Create Routing Config API endpoint"
1717
1818 memory = 512
1919 timeout = 3
@@ -28,20 +28,20 @@ module "get_routing_config_lambda" {
2828 lambda_env_vars = local. backend_lambda_environment_variables
2929 function_s3_bucket = var. function_s3_bucket
3030 function_code_base_path = local. lambdas_dir
31- function_code_dir = " backend-api/dist/get -routing-config"
31+ function_code_dir = " backend-api/dist/created -routing-config"
3232
3333 send_to_firehose = var. send_to_firehose
3434 log_destination_arn = var. log_destination_arn
3535 log_subscription_role_arn = var. log_subscription_role_arn
3636}
3737
38- data "aws_iam_policy_document" "get_routing_config_lambda_policy " {
38+ data "aws_iam_policy_document" "create_routing_config_lambda_policy " {
3939 statement {
4040 sid = " AllowDynamoAccess"
4141 effect = " Allow"
4242
4343 actions = [
44- " dynamodb:GetItem " ,
44+ " dynamodb:PutItem " ,
4545 ]
4646
4747 resources = [
0 commit comments