import updateSettingsPlugins from "@webiny/api-page-builder/updateSettings" ; import { DocumentClient } from "aws-sdk/clients/dynamodb" ; import { createHandler } from "@webiny/handler-aws" ; import { createElasticsearchClient } from "@webiny/api-elasticsearch/client" ; import { createStorageOperations as createPageBuilderStorageOperations } from "@webiny/api-page-builder-so-ddb-es" ; const documentClient = new DocumentClient ( { convertEmptyValues : true , region : process . env . AWS_REGION } ) ; const elasticsearchClient = createElasticsearchClient ( { endpoint : `https://${ process . env . ELASTIC_SEARCH_ENDPOINT }` } ) ; export const handler = createHandler ( { plugins : [ updateSettingsPlugins ( { storageOperations : createPageBuilderStorageOperations ( { documentClient , elasticsearch : elasticsearchClient } ) } ) ] } ) ;