From 8f04b0f67997fa0b29c5a1e51f4eeb0e95108d7b Mon Sep 17 00:00:00 2001 From: Pavi <13897936+pavinthan@users.noreply.github.com> Date: Wed, 15 Jan 2025 01:02:31 +0800 Subject: [PATCH] fix: cleanup custom functions docs (#8197) * fix: cleanup custom functions docs removed duplicated lines * Adds path reference for local function bundling Ensures direct file location support for consistent build outputs --- .../build-a-backend/functions/custom-functions/index.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx b/src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx index 20974c6780b..e5bf50312cc 100644 --- a/src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx +++ b/src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx @@ -113,9 +113,9 @@ import { fileURLToPath } from "node:url"; import { defineFunction } from "@aws-amplify/backend"; import { DockerImage, Duration } from "aws-cdk-lib"; import { Code, Function, Runtime } from "aws-cdk-lib/aws-lambda"; -import { defineFunction } from "@aws-amplify/backend"; -import { DockerImage, Duration } from "aws-cdk-lib"; -import { Code, Function, Runtime } from "aws-cdk-lib/aws-lambda"; + +const functionDir = path.dirname(fileURLToPath(import.meta.url)); + export const sayHelloFunctionHandler = defineFunction( (scope) => new Function(scope, "say-hello", {