When providing my own edge function I get a error saying a lambda@edge can not have environment variables. I guess its because sst is injecting some env vars to sst.aws.Function.
protection: {
mode: "oac-with-edge-signing",
edgeFunction: {
arn: edgeFunction.nodes.function.apply(
(fn) => fn.qualifiedArn,
) as $util.Output<sst.aws.FunctionArn>,
},
},
Will this be fixed or should i just use the transform as I am doing now to bypass it?
$transform(sst.aws.Function, (args, opts, name) => {
if (name.includes("EdgeFunction")) {
args.environment = {};
}
});
EDIT:
this did not work:
$transform(sst.aws.Function, (args, opts, name) => {
if (name.includes("EdgeFunction")) {
args.environment = {};
}
});