Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
Our Lambda@Edge function code was using DynamoDB command classes exported from the @aws-sdk/client-dynamodb package, and not @aws-sdk/lib-dynamodb.
This caused a problem in the getTenantIdByDomain function, because it was not returning a string (tenant ID), but an { S: TENANT_ID } unmarshalled object.
Ultimately, this caused the website router not to work in cases where users had 2 or more tenants in their system (the above function only gets called in this case), which the log below made obvious:
Changes
Our Lambda@Edge function code was using DynamoDB command classes exported from the
@aws-sdk/client-dynamodb
package, and not@aws-sdk/lib-dynamodb
.This caused a problem in the
getTenantIdByDomain
function, because it was not returning a string (tenant ID), but an{ S: TENANT_ID }
unmarshalled object.Ultimately, this caused the website router not to work in cases where users had 2 or more tenants in their system (the above function only gets called in this case), which the log below made obvious:
How Has This Been Tested?
Manually.
Documentation
Changelog.