From e3f5722d96f3a97f2414f99945236fcec2e2229e Mon Sep 17 00:00:00 2001 From: Nestor Carvantes Date: Thu, 5 Aug 2021 15:32:46 -0500 Subject: [PATCH] fix: allow more concurrent export jobs for multi-tenant deployments (#397) --- cloudformation/bulkExport.yaml | 8 +++++++- serverless.yaml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cloudformation/bulkExport.yaml b/cloudformation/bulkExport.yaml index 586f096f..06f2e8d7 100644 --- a/cloudformation/bulkExport.yaml +++ b/cloudformation/bulkExport.yaml @@ -167,7 +167,13 @@ Resources: Name: glueetl PythonVersion: '3' ExecutionProperty: - MaxConcurrentRuns: 2 + MaxConcurrentRuns: + !If + - isMultiTenancyEnabled + # Adjust this number based on the number of tenants. + # The default throttling on fhir-works-on-aws-persistence-ddb allows 2 concurrent export jobs per tenant + - 30 + - 2 DefaultArguments: '--TempDir': !Join ['', ['s3://', !Ref BulkExportResultsBucket, '/temp']] '--ddbTableName': '${self:custom.resourceTableName}' diff --git a/serverless.yaml b/serverless.yaml index abd2fddc..aa28b8a3 100644 --- a/serverless.yaml +++ b/serverless.yaml @@ -217,6 +217,7 @@ resources: isDev: !Equals [!Ref Stage, 'dev'] isNotDev: !Not [Condition: isDev] isUsingHapiValidator: !Equals [!Ref UseHapiValidator, 'true'] + isMultiTenancyEnabled: !Equals [!Ref EnableMultiTenancy, 'true'] - Resources: ResourceDynamoDBTableV2: Metadata: