https://serverless-stack.com/ logo
#sst
Title
# sst
r

Roger Rajaratnam

03/24/2022, 4:29 PM
Does anyone know how to create a lambda@edge function from a local file?
a

Adam Fanello

03/24/2022, 4:38 PM
Copy code
// Create the CloudFront Lambda@Edge in its own specialized stack in us-east-1
    const jobAccessControl = new experimental.EdgeFunction(this, "JobAccessControl", {
      handler: "jobs-access-control-lambda.handler",
      functionName: scope.logicalPrefixedName("jobAccessControl"),
      runtime: Runtime.NODEJS_14_X,
      code: Code.fromAsset(path.resolve("src/stacks/iot-jobs-distribution")),
      role: props.jobsAccessControlRole,
      stackId: `${scope.logicalPrefixedName("jobAccessControl")}`,
    });
r

Roger Rajaratnam

03/24/2022, 5:03 PM
Awesome thank you.
f

Frank

03/25/2022, 2:08 AM
Thanks Adam!
6 Views