From cd1db3d627c9f294d59bd22f459398115fc98b8a Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 7 Mar 2023 15:56:03 +0100 Subject: [PATCH] fix: temporary fix for access log format to allow http gateway deploy (#153) Temporary fix for CI issue from https://github.com/serverless-stack/sst/issues/2587 as suggested in https://github.com/serverless-stack/sst/issues/2587#issuecomment-1455875437 The fix simply tweaks the `accessLog` format to not include the `cognitoIdentityId` like fix from sst https://github.com/serverless-stack/sst/pull/2602/files In the meantime, hopefully sst team provides a fix for v1, or we need to work on landing our update https://github.com/web3-storage/w3infra/pull/152 . I started by trying to update, but after spending over 2 hours debugging random CI SegFaults and other deployment issues decided to punt on this for now. v2 is quite recent and maybe we should stay in v1 some more time given these SegFault errors are likely not related to our code... --- stacks/upload-api-stack.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stacks/upload-api-stack.js b/stacks/upload-api-stack.js index ecf861d7..1d4899a3 100644 --- a/stacks/upload-api-stack.js +++ b/stacks/upload-api-stack.js @@ -66,6 +66,9 @@ export function UploadApiStack({ stack, app }) { 'GET /error': 'functions/get.error', 'GET /version': 'functions/get.version' }, + accessLog: { + format:'{"requestTime":"$context.requestTime","requestId":"$context.requestId","httpMethod":"$context.httpMethod","path":"$context.path","routeKey":"$context.routeKey","status":$context.status,"responseLatency":$context.responseLatency,"integrationRequestId":"$context.integration.requestId","integrationStatus":"$context.integration.status","integrationLatency":"$context.integration.latency","integrationServiceStatus":"$context.integration.integrationStatus","ip":"$context.identity.sourceIp","userAgent":"$context.identity.userAgent"}' + } }) stack.addOutputs({