Skip to content

Commit

Permalink
PRMP-1025: Lambda Memory Limits being reached with ~4 concurrent users (
Browse files Browse the repository at this point in the history
  • Loading branch information
steph-torres-nhs authored Oct 14, 2024
1 parent 725c67b commit fe0913f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions infrastructure/lambda-authoriser.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module "authoriser-lambda" {
http_methods = ["GET"]
is_gateway_integration_needed = false
is_invoked_from_gateway = true
memory_size = 256

depends_on = [
aws_iam_policy.ssm_policy_authoriser,
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-create-doc-ref.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module "create-doc-ref-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.create-doc-ref-gateway.gateway_resource_id
http_methods = ["POST"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-delete-doc-ref.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module "delete-doc-ref-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.delete-doc-ref-gateway.gateway_resource_id
http_methods = ["DELETE"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-document-manifest-job.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ module "document-manifest-job-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.document-manifest-job-gateway.gateway_resource_id
http_methods = ["GET", "POST"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-login-redirect.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module "login_redirect_lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = aws_api_gateway_resource.login_resource.id
http_methods = ["GET"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-logout.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module "logout_lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.logout-gateway.gateway_resource_id
http_methods = ["GET"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-search-doc-references.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module "search-document-references-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.search-document-references-gateway.gateway_resource_id
http_methods = ["GET"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-search-patient.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ module "search-patient-details-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.search-patient-details-gateway.gateway_resource_id
http_methods = ["GET"]
memory_size = 256
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-update-upload-state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ module "update-upload-state-lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.update-upload-state-gateway.gateway_resource_id
http_methods = ["POST"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down
1 change: 1 addition & 0 deletions infrastructure/lambda-upload-confirm-result.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module "upload_confirm_result_lambda" {
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
resource_id = module.upload_confirm_result_gateway.gateway_resource_id
http_methods = ["POST"]
memory_size = 256
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
lambda_environment_variables = {
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
Expand Down

0 comments on commit fe0913f

Please sign in to comment.