Is there a difference between an edge function and...
# help
d
Is there a difference between an edge function and a function? Like do I need to import
Copy code
import { EdgeFunction } from "@serverless-stack/resources";
or something? Or is what makes it “edge” that I’m doing some config work with
cfDistrobution
f
Currently u can’t use an
sst.Function
as an Edge function. There are some limitations (ie. u can’t have environment variables for an Edge function).
d
This would be great to have in SST though. 👍
f
Behind the scene, this construct just wraps around the
lambda.Function
if you are deploying to
us-east-1
. And if you are deploying to other regions, it will create a new stack in ur app with a
lambda.Function
and that stack will be deployed to to
us-east-1
d
Okay… I will try this 😰