From fdf47ee13bc8c1700684b2877bb13c2b0ac50af4 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Mon, 15 Apr 2024 17:33:13 +0300 Subject: [PATCH 01/17] Enable metrics collection for develop --- develop-template.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/develop-template.yaml b/develop-template.yaml index 41e4425..74b82c1 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -135,7 +135,7 @@ Resources: DyanmoDBFullAccessPolicy: Type: AWS::IAM::ManagedPolicy Properties: - Description: Allows functions to write logs + Description: Allows functions to interact with aws Roles: - !Ref DocspaceReverseProxyRole PolicyDocument: @@ -159,6 +159,7 @@ Resources: - cloudwatch:GetMetricStatistics - cloudwatch:ListMetrics - cloudwatch:PutMetricAlarm + - cloudwatch:PutMetricData - cloudwatch:GetMetricData - datapipeline:ActivatePipeline - datapipeline:CreatePipeline From af9b1ed9fa47b1b368514c9ecce40bf3b39c3594 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Mon, 15 Apr 2024 17:45:05 +0300 Subject: [PATCH 02/17] Enable metrics collection for develop v2 --- develop-template.yaml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/develop-template.yaml b/develop-template.yaml index 74b82c1..e56f5a8 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -131,11 +131,25 @@ Resources: - logs:CreateLogStream - logs:PutLogEvents Resource: "*" + + PutMetricsPolicy: + Type: AWS::IAM::ManagedPolicy + Properties: + Description: Allows functions to put metrics + Roles: + - !Ref DocspaceReverseProxyRole + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - cloudwatch:PutMetricData + Resource: "*" DyanmoDBFullAccessPolicy: Type: AWS::IAM::ManagedPolicy Properties: - Description: Allows functions to interact with aws + Description: Set dynamodb permissions Roles: - !Ref DocspaceReverseProxyRole PolicyDocument: @@ -159,7 +173,6 @@ Resources: - cloudwatch:GetMetricStatistics - cloudwatch:ListMetrics - cloudwatch:PutMetricAlarm - - cloudwatch:PutMetricData - cloudwatch:GetMetricData - datapipeline:ActivatePipeline - datapipeline:CreatePipeline From c228156c6182fe0c9d4051f71214f71af61e7466 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 16 Apr 2024 08:22:41 +0300 Subject: [PATCH 03/17] Enable metrics collection for develop v3 --- develop-template.yaml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/develop-template.yaml b/develop-template.yaml index e56f5a8..9652a9c 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -125,26 +125,10 @@ Resources: PolicyDocument: Version: 2012-10-17 Statement: - - Effect: Deny + - Effect: Allow Action: - - logs:CreateLogGroup - - logs:CreateLogStream - - logs:PutLogEvents + - cloudwatch:PutMetricData Resource: "*" - - PutMetricsPolicy: - Type: AWS::IAM::ManagedPolicy - Properties: - Description: Allows functions to put metrics - Roles: - - !Ref DocspaceReverseProxyRole - PolicyDocument: - Version: 2012-10-17 - Statement: - - Effect: Allow - Action: - - cloudwatch:PutMetricData - Resource: "*" DyanmoDBFullAccessPolicy: Type: AWS::IAM::ManagedPolicy From 1ce2d68d0ef99d82ee21194e03f853f4780a959b Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 16 Apr 2024 08:43:35 +0300 Subject: [PATCH 04/17] Enable metrics collection for develop v4 --- develop-template.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/develop-template.yaml b/develop-template.yaml index 9652a9c..0ce978d 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -127,6 +127,9 @@ Resources: Statement: - Effect: Allow Action: + - logs:CreateLogGroup + - logs:CreateLogStream + - logs:PutLogEvents - cloudwatch:PutMetricData Resource: "*" From 4691e2f084990b4987d39cfc158b53f417280616 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 13:24:40 +0300 Subject: [PATCH 05/17] Add first version of zoom reverse proxy --- develop-template.yaml | 23 +++++++++++ zoom-reverse-proxy/index.mjs | 80 ++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 zoom-reverse-proxy/index.mjs diff --git a/develop-template.yaml b/develop-template.yaml index 0ce978d..30959d5 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -53,6 +53,29 @@ Resources: ApplyOn: None PackageType: Zip Role: !GetAtt DocspaceReverseProxyRole.Arn + + zoomreverseproxy: + Type: AWS::Serverless::Function + Properties: + CodeUri: zoom-reverse-proxy/ + Description: "" + MemorySize: 128 + Timeout: 3 + Handler: index.handler + Runtime: nodejs18.x + Architectures: + - x86_64 + EventInvokeConfig: + MaximumEventAgeInSeconds: 21600 + MaximumRetryAttempts: 2 + EphemeralStorage: + Size: 512 + RuntimeManagementConfig: + UpdateRuntimeOn: Auto + SnapStart: + ApplyOn: None + PackageType: Zip + Role: !GetAtt DocspaceReverseProxyRole.Arn GlobalDynamoDBTable: Type: AWS::DynamoDB::GlobalTable diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs new file mode 100644 index 0000000..88964eb --- /dev/null +++ b/zoom-reverse-proxy/index.mjs @@ -0,0 +1,80 @@ +'use strict'; + +const AWS = require('aws-sdk'); +const cachedItem = {}; +const regionsMap = { + 'us-west-2': 'oforms.onlyoffice.com', + 'eu-central-1': 'blog.onlyoffice.com', + 'default': 'onlyoffice.com' +}; + +const ddbRegionsMap = { + ddbRegionsMap_placeholder +}; + +const dynamodbTableName = "dynamodb_table_name_placeholder"; + +const execRegionCode = process.env.AWS_REGION; +var ddbClientRegion = ddbRegionsMap[execRegionCode] || ddbRegionsMap["default"]; + +console.log("DynamoDB client region set to: %s", ddbClientRegion); + +const { DynamoDBClient, GetItemCommand } = require("@aws-sdk/client-dynamodb"); + +async function getTenantRegion(ddbRegion, tenantDomain) { + console.log("Fetching tenant region for domain: %s from DynamoDB region: %s", tenantDomain, ddbRegion); + const ddbClient = new DynamoDBClient({ region: ddbRegion }); + const getItemParams = { + Key: { 'tenant_domain': { S: tenantDomain } }, + ProjectionExpression: "tenant_region", + TableName: dynamodbTableName + }; + + try { + const response = await ddbClient.send(new GetItemCommand(getItemParams)); + if (response.Item) { + const tenantRegion = regionsMap[response.Item["tenant_region"]["S"]]; + console.log("Tenant region fetched: %s", tenantRegion); + return tenantRegion; + } else { + console.warn("No data found for domain: %s", tenantDomain); + return null; + } + } catch (err) { + console.error("Error fetching from DynamoDB: %s", err); + return null; + } +} + +exports.handler = async (event) => { + const request = event.Records[0].cf.request; + const headers = request.headers; + const fullDomain = headers.host[0].value.toLowerCase(); + const domainParts = fullDomain.split('.'); + + if (domainParts.length === 4 && domainParts[1] === 'devops' && domainParts[2] === 'onlyoffice' && domainParts[3] === 'io') { + const tenantDomain = fullDomain; + + // Check the cache first + if (cachedItem[tenantDomain] && cachedItem[tenantDomain].expiresOn > Date.now()) { + request.origin.custom.domainName = cachedItem[tenantDomain].value; + console.log("Origin fetched from cache for domain: %s", tenantDomain); + } else { + // Fetch the region from DynamoDB and update the origin + const tenantRegion = await getTenantRegion(ddbClientRegion, tenantDomain); + if (tenantRegion) { + request.origin.custom.domainName = tenantRegion; + cachedItem[tenantDomain] = { + value: tenantRegion, + expiresOn: Date.now() + 15 * 60 * 1000 // Cache for 15 minutes + }; + console.log("Origin updated to %s for domain: %s", tenantRegion, tenantDomain); + } else { + request.origin.custom.domainName = regionsMap["default"]; + console.log("Default origin used for domain: %s", tenantDomain); + } + } + } + + return request; +}; From 7d64afc6b1a11f72fdb7e9c204139cf9aca90942 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 13:31:31 +0300 Subject: [PATCH 06/17] Fix deployment --- .github/workflows/sam-pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sam-pipeline.yml b/.github/workflows/sam-pipeline.yml index 201484f..deeee73 100644 --- a/.github/workflows/sam-pipeline.yml +++ b/.github/workflows/sam-pipeline.yml @@ -52,6 +52,7 @@ jobs: fi awk -v rmap="$( temp_index.mjs && mv temp_index.mjs ./docspace-reverse-proxy/index.mjs awk -v rmap="$( temp_index.mjs && mv temp_index.mjs ./docspace-reverse-proxy/index.mjs + awk -v rmap="$( temp_index.mjs && mv temp_index.mjs ./zoom-reverse-proxy/index.mjs # Build and deploy stack - run: sam build -u --template-file ${GITHUB_REF_NAME}-template.yaml From bb9b420a7b7628c934f3afb1c5054487146a1d0e Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 13:42:57 +0300 Subject: [PATCH 07/17] Fix zoom reverse proxy deps --- zoom-reverse-proxy/index.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs index 88964eb..5bf54c8 100644 --- a/zoom-reverse-proxy/index.mjs +++ b/zoom-reverse-proxy/index.mjs @@ -1,6 +1,6 @@ 'use strict'; -const AWS = require('aws-sdk'); +import AWS from 'aws-sdk'; const cachedItem = {}; const regionsMap = { 'us-west-2': 'oforms.onlyoffice.com', @@ -19,7 +19,7 @@ var ddbClientRegion = ddbRegionsMap[execRegionCode] || ddbRegionsMap["default"]; console.log("DynamoDB client region set to: %s", ddbClientRegion); -const { DynamoDBClient, GetItemCommand } = require("@aws-sdk/client-dynamodb"); +import { DynamoDBClient, GetItemCommand } from "@aws-sdk/client-dynamodb"; async function getTenantRegion(ddbRegion, tenantDomain) { console.log("Fetching tenant region for domain: %s from DynamoDB region: %s", tenantDomain, ddbRegion); @@ -46,7 +46,7 @@ async function getTenantRegion(ddbRegion, tenantDomain) { } } -exports.handler = async (event) => { +export async function handler(event) { const request = event.Records[0].cf.request; const headers = request.headers; const fullDomain = headers.host[0].value.toLowerCase(); @@ -77,4 +77,4 @@ exports.handler = async (event) => { } return request; -}; +} From eb495f1fb44dccd543a10564f587b0d5c5957919 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 13:53:50 +0300 Subject: [PATCH 08/17] Fix zoom reverse proxy deps v2 --- zoom-reverse-proxy/index.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs index 5bf54c8..ed56f12 100644 --- a/zoom-reverse-proxy/index.mjs +++ b/zoom-reverse-proxy/index.mjs @@ -1,6 +1,5 @@ 'use strict'; -import AWS from 'aws-sdk'; const cachedItem = {}; const regionsMap = { 'us-west-2': 'oforms.onlyoffice.com', From 44e55958b3f964e1be4989d8156a1699183ca106 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 14:26:06 +0300 Subject: [PATCH 09/17] Test zoom reverse proxy --- zoom-reverse-proxy/index.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs index ed56f12..aa6aed0 100644 --- a/zoom-reverse-proxy/index.mjs +++ b/zoom-reverse-proxy/index.mjs @@ -2,9 +2,9 @@ const cachedItem = {}; const regionsMap = { - 'us-west-2': 'oforms.onlyoffice.com', - 'eu-central-1': 'blog.onlyoffice.com', - 'default': 'onlyoffice.com' + 'us-west-2': 'ec2-54-156-143-89.compute-1.amazonaws.com', + 'eu-central-1': 'ec2-35-85-95-46.us-west-2.compute.amazonaws.com', + 'default': 'ec2-54-156-143-89.compute-1.amazonaws.com' }; const ddbRegionsMap = { @@ -70,7 +70,7 @@ export async function handler(event) { console.log("Origin updated to %s for domain: %s", tenantRegion, tenantDomain); } else { request.origin.custom.domainName = regionsMap["default"]; - console.log("Default origin used for domain: %s", tenantDomain); + console.log("Default origin (%s) used for domain: %s", regionsMap["default"], tenantDomain); } } } From a831dfd010ca27aacea41e91ebb23d18b07452f0 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 14:54:35 +0300 Subject: [PATCH 10/17] Fix zoom reverse proxy ddbregion set --- zoom-reverse-proxy/index.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs index aa6aed0..5174fc2 100644 --- a/zoom-reverse-proxy/index.mjs +++ b/zoom-reverse-proxy/index.mjs @@ -14,7 +14,14 @@ const ddbRegionsMap = { const dynamodbTableName = "dynamodb_table_name_placeholder"; const execRegionCode = process.env.AWS_REGION; -var ddbClientRegion = ddbRegionsMap[execRegionCode] || ddbRegionsMap["default"]; + +var ddbClientRegion = ddbRegionsMap["default"]; + +if (ddbRegionsMap[execRegionCode]) { + ddbClientRegion = ddbRegionsMap[execRegionCode]; + + console.log("change ddbClient region from %s to %s", ddbRegionsMap["default"], ddbClientRegion); +} console.log("DynamoDB client region set to: %s", ddbClientRegion); From 447e0e0239a5443462204d1e58c6cd56ade3de8e Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 30 Jul 2024 15:03:14 +0300 Subject: [PATCH 11/17] Fix zoom reverse proxy ddbregion set v2 --- .github/workflows/sam-pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sam-pipeline.yml b/.github/workflows/sam-pipeline.yml index deeee73..7dbb3f6 100644 --- a/.github/workflows/sam-pipeline.yml +++ b/.github/workflows/sam-pipeline.yml @@ -31,6 +31,7 @@ jobs: export DYNAMODB_TABLE_NAME="${{ secrets.MAIN_DYNAMODB_TABLE_NAME }}" fi sed -i "s/dynamodb_table_name_placeholder/${DYNAMODB_TABLE_NAME}/g" ./docspace-reverse-proxy/index.mjs + sed -i "s/dynamodb_table_name_placeholder/${DYNAMODB_TABLE_NAME}/g" ./zoom-reverse-proxy/index.mjs - name: Set viewer request domain name variable run: | From 791a6d4ddadea25d795ca84d5f336065c1695b79 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Wed, 31 Jul 2024 16:17:00 +0300 Subject: [PATCH 12/17] Update node.js version 18.x to 20.x --- develop-template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/develop-template.yaml b/develop-template.yaml index 30959d5..6801f4d 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -16,7 +16,7 @@ Resources: MemorySize: 256 Timeout: 3 Handler: index.handler - Runtime: nodejs18.x + Runtime: nodejs20.x Architectures: - x86_64 EventInvokeConfig: @@ -39,7 +39,7 @@ Resources: MemorySize: 128 Timeout: 3 Handler: index.handler - Runtime: nodejs18.x + Runtime: nodejs20.x Architectures: - x86_64 EventInvokeConfig: @@ -62,7 +62,7 @@ Resources: MemorySize: 128 Timeout: 3 Handler: index.handler - Runtime: nodejs18.x + Runtime: nodejs20.x Architectures: - x86_64 EventInvokeConfig: From 67deb639b8d15a4a4dbf3e6c8b42106c46edb14d Mon Sep 17 00:00:00 2001 From: Alexey Bannov Date: Mon, 5 Aug 2024 12:20:06 +0300 Subject: [PATCH 13/17] optimization of work --- docspace-reverse-proxy/index.mjs | 66 +++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/docspace-reverse-proxy/index.mjs b/docspace-reverse-proxy/index.mjs index dca8a45..d23f31a 100644 --- a/docspace-reverse-proxy/index.mjs +++ b/docspace-reverse-proxy/index.mjs @@ -1,47 +1,77 @@ 'use strict'; +import { DynamoDBClient, GetItemCommand } from "@aws-sdk/client-dynamodb"; + +const DEBUG_MODE_ON = true; + +if (!DEBUG_MODE_ON) { + console = console || {}; + console.log = function(){}; +} + const cachedItem = {}; + const regionsMap = { -regionsMap_placeholder + regionsMap_placeholder }; - + const ddbRegionsMap = { -ddbRegionsMap_placeholder + ddbRegionsMap_placeholder }; - + const dynamodbTableName = "dynamodb_table_name_placeholder"; -const execRegionCode = process.env.AWS_REGION; +const execAWSRegion = process.env.AWS_REGION; var ddbClientRegion = ddbRegionsMap["default"]; -if (ddbRegionsMap[execRegionCode]) { - ddbClientRegion = ddbRegionsMap[execRegionCode]; +if (ddbRegionsMap[execAWSRegion]) { + ddbClientRegion = ddbRegionsMap[execAWSRegion]; console.log("change ddbClient region from %s to %s", ddbRegionsMap["default"], ddbClientRegion); } -import { DynamoDBClient, GetItemCommand } from "@aws-sdk/client-dynamodb"; +var ddbClient = null; +var ddbClientDefault = null; -async function getTenantRegion(ddbRegion, tenantDomain) { +function getDynamoDBClient(ddbRegion) { + + if (ddbRegion == ddbRegionsMap["default"]) { + if (ddbClientDefault == null) { + ddbClientDefault = new DynamoDBClient({ region: ddbRegionsMap["default"] }); + } + + return ddbClientDefault; + } else { + if (ddbClient == null) { + ddbClient = new DynamoDBClient({ region: ddbRegion }); + } + + return ddbClient; + } +} - console.log("getTenantRegion params ddbRegion: %s, tenantDomain: %s", ddbRegion, tenantDomain); - const ddbClient = new DynamoDBClient({ region: ddbRegion }); +async function getTenantRegion(ddbRegion, tenantDomain) { + console.log("getTenantRegion params ddbRegion: %s, tenantDomain: %s", ddbRegion, tenantDomain); const getItemParams = { Key: { - 'tenant_domain': { S: tenantDomain } + "tenant_domain": { S: tenantDomain } }, ProjectionExpression: "tenant_region", TableName: dynamodbTableName }; - console.log("[DynamoDb] before send command get item %s with tenant domain %s", JSON.stringify(getItemParams), tenantDomain); + console.log(`[DynamoDb] before send GetItemCommand ${JSON.stringify(getItemParams)} with tenant domain ${tenantDomain}`); + + const start = Date.now(); + + const response = await getDynamoDBClient(ddbRegion).send(new GetItemCommand(getItemParams)); - const response = await ddbClient.send(new GetItemCommand(getItemParams)); + const end = Date.now(); - console.log("[DynamoDb] responce send command get item %s with tenant domain %s", JSON.stringify(response), tenantDomain); + console.log(`[DynamoDb] after send GetItemCommand ${JSON.stringify(response)} with tenant domain ${tenantDomain}. Execution time: ${end - start} `); if (response && response.Item) { @@ -74,17 +104,17 @@ export const handler = async (event, context, callback) => { if (request.uri.toLowerCase() == "/apisystem/portal/register" && request.method == "POST") { console.log("START: Register portal request"); - console.log("Register portal request body %s", request.body); let body = JSON.parse(Buffer.from(request.body.data, 'base64').toString('utf8')); let regionFromRequest = body["awsRegion"]; let portalName = body["portalName"]; - + if(regionFromRequest !== null && regionFromRequest !== '' && regionFromRequest!==undefined) { regionFromRequest = regionFromRequest.toLowerCase(); } + originDomain = regionsMap[regionFromRequest]; console.log("Register portal request: Origin Domain is %s, awsRegion is %s", originDomain, regionFromRequest); @@ -112,7 +142,7 @@ export const handler = async (event, context, callback) => { console.log("Register portal request: Change request origin to %s", originDomain); } - console.log("request after changed %s", JSON.stringify(request)); + console.log("request after changed %s", JSON.stringify(request)); console.log("END: Register portal request"); From 8cbf4df78b515a19946a8a2f5f5219dbb958fa30 Mon Sep 17 00:00:00 2001 From: Alexey Bannov Date: Mon, 5 Aug 2024 12:28:05 +0300 Subject: [PATCH 14/17] upgrade lambda config --- develop-template.yaml | 2 +- main-template.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/develop-template.yaml b/develop-template.yaml index 6801f4d..ffe319a 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -13,7 +13,7 @@ Resources: Properties: CodeUri: docspace-reverse-proxy/ Description: "" - MemorySize: 256 + MemorySize: 512 Timeout: 3 Handler: index.handler Runtime: nodejs20.x diff --git a/main-template.yaml b/main-template.yaml index 7079849..75a073a 100644 --- a/main-template.yaml +++ b/main-template.yaml @@ -13,10 +13,10 @@ Resources: Properties: CodeUri: docspace-reverse-proxy/ Description: "" - MemorySize: 256 + MemorySize: 512 Timeout: 3 Handler: index.handler - Runtime: nodejs18.x + Runtime: nodejs20.x Architectures: - x86_64 EventInvokeConfig: From 97761f295c5117b5bc20a206f2aee3ae073e9f3b Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Tue, 6 Aug 2024 09:53:32 +0300 Subject: [PATCH 15/17] Disable io lambda logging --- develop-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-template.yaml b/develop-template.yaml index ffe319a..82872c1 100644 --- a/develop-template.yaml +++ b/develop-template.yaml @@ -148,7 +148,7 @@ Resources: PolicyDocument: Version: 2012-10-17 Statement: - - Effect: Allow + - Effect: Deny Action: - logs:CreateLogGroup - logs:CreateLogStream From c5a6ca3eab15a813aae28409859456f5d7a97188 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Thu, 5 Sep 2024 14:39:44 +0300 Subject: [PATCH 16/17] Set regionsmap placeholder to zoom_rr --- zoom-reverse-proxy/index.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zoom-reverse-proxy/index.mjs b/zoom-reverse-proxy/index.mjs index 5174fc2..cc8e048 100644 --- a/zoom-reverse-proxy/index.mjs +++ b/zoom-reverse-proxy/index.mjs @@ -2,9 +2,7 @@ const cachedItem = {}; const regionsMap = { - 'us-west-2': 'ec2-54-156-143-89.compute-1.amazonaws.com', - 'eu-central-1': 'ec2-35-85-95-46.us-west-2.compute.amazonaws.com', - 'default': 'ec2-54-156-143-89.compute-1.amazonaws.com' + regionsMap_placeholder }; const ddbRegionsMap = { From c902c546c5e2085d3c6550dacaced8cae69390c2 Mon Sep 17 00:00:00 2001 From: Yaroslav Pshenichnikov Date: Thu, 5 Sep 2024 15:06:58 +0300 Subject: [PATCH 17/17] Update docspace-viewer-request node version 18 to 20 --- main-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-template.yaml b/main-template.yaml index 75a073a..553e6b8 100644 --- a/main-template.yaml +++ b/main-template.yaml @@ -39,7 +39,7 @@ Resources: MemorySize: 128 Timeout: 3 Handler: index.handler - Runtime: nodejs18.x + Runtime: nodejs20.x Architectures: - x86_64 EventInvokeConfig: