-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
@njlynch 's new EdgeFunction
(see #10500) is very handy for when a stack is deployed outside of us-east-1.
As of now, it extends lambda.FunctionProps
, which prevents using the convenience lambda operators such as aws-lamdba-nodejs
and aws-lambda-python
.
It would be great if you could somehow specify that you want to bundle using the convenience operators while still taking advantage of the cross-region behaviors provided by EdgeFunction
.
Use Case
I almost always use Typescript alongside aws-lambda-nodejs
's NodejsFunction
operator. This provides me type-safety when developing. However, I also want to deploy my main stack in us-west-2
, so EdgeFunction
is really handy for me.
Proposed Solution
A (potentially naive) solution would be to provide EdgeFunction
, EdgeNodejsFunction
, EdgePythonFunction
, etc.
Another idea would be to somehow specify the type of Lambda you're using in property, e.g.,
new cloudfront.experimental.EdgeFunction(this, 'EdgeFunction', {
functionType: cloudfront.experiment.EdgeFunctionType.NODE_JS, // maybe default to regular lamdba.Function here?
functionProps: { }, // Typescript requires NodejsFunctionProps here
});
Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request