https://serverless-stack.com/ logo
#help
Title
# help
d

Devin

02/16/2022, 7:06 PM
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

Frank

02/16/2022, 7:41 PM
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

Dan Van Brunt

02/16/2022, 7:46 PM
This would be great to have in SST though. 👍
f

Frank

02/16/2022, 7:46 PM
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

Devin

02/16/2022, 7:54 PM
Okay… I will try this 😰