Skip to content

Commit ff1f1ac

Browse files
authored
Adds path reference for local function bundling
Ensures direct file location support for consistent build outputs
1 parent 68e1088 commit ff1f1ac

File tree

1 file changed

+2
-0
lines changed
  • src/pages/[platform]/build-a-backend/functions/custom-functions

1 file changed

+2
-0
lines changed

src/pages/[platform]/build-a-backend/functions/custom-functions/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ import { defineFunction } from "@aws-amplify/backend";
114114
import { DockerImage, Duration } from "aws-cdk-lib";
115115
import { Code, Function, Runtime } from "aws-cdk-lib/aws-lambda";
116116

117+
const functionDir = path.dirname(fileURLToPath(import.meta.url));
118+
117119
export const sayHelloFunctionHandler = defineFunction(
118120
(scope) =>
119121
new Function(scope, "say-hello", {

0 commit comments

Comments
 (0)