diff --git a/aws/auth.py b/aws/auth.py index 5307b8f..ca15856 100644 --- a/aws/auth.py +++ b/aws/auth.py @@ -24,7 +24,8 @@ def generate_policy(principalId, effect, resource, message="", name=None, identi 'user_id': user_id, 'identities': str(identities), 'globus_dependent_token': str(dependent_token), - 'user_email': user_email + 'user_email': user_email, + 'message': message } print("AuthResponse", authResponse) return authResponse diff --git a/infra/mdf/container_lambdas.tf b/infra/mdf/container_lambdas.tf index bd40373..17128f0 100644 --- a/infra/mdf/container_lambdas.tf +++ b/infra/mdf/container_lambdas.tf @@ -32,6 +32,9 @@ resource "aws_lambda_function" "mdf-connect-containerized-auth" { architectures = ["x86_64"] role = aws_iam_role.lambda_execution.arn timeout = 30 + environment { + variables = local.env_vars[each.key] + } } resource "aws_lambda_function" "mdf-connect-containerized-submit" { diff --git a/infra/mdf/lambda_environment_vars.tf b/infra/mdf/lambda_environment_vars.tf index 365e3f1..647135d 100644 --- a/infra/mdf/lambda_environment_vars.tf +++ b/infra/mdf/lambda_environment_vars.tf @@ -4,7 +4,7 @@ variable "prod_env_vars" { type = map default = { DYNAMO_STATUS_TABLE="MDF-Connect-prod" - MDF_SECRETS_NAME="Globus" + MDF_SECRETS_NAME="MDF-Connect-Secrets-prod" MDF_AWS_REGION="us-east-1" GDRIVE_EP="f00dfd6c-edf4-4c8b-a4b1-be6ad92a4fbb" GDRIVE_ROOT="/Shared With Me" @@ -25,7 +25,7 @@ variable "test_env_vars" { type = map default = { DYNAMO_STATUS_TABLE="MDF-Connect-test" - MDF_SECRETS_NAME="Globus" + MDF_SECRETS_NAME="MDF-Connect-Secrets-test" MDF_AWS_REGION="us-east-1" GDRIVE_EP="f00dfd6c-edf4-4c8b-a4b1-be6ad92a4fbb" GDRIVE_ROOT="/Shared With Me"