I’m trying to figure if I can use some sort of dynamic configuration when defining a Cloudfront function.
Basically I want the function body to use an array with some information that’s not hardcoded within the function.
Is this something that’s possible?
01/10/2022, 3:38 PM
Or you can set the configuration as environment variables for the deployed function.
Apologies misread your question - Cloudfront Functions, not Lambda@Edge. For CF Functions pulumi requires the source code as a string and don't do capture of the function.
You can create the code string dynamically using pulumi outputs. e.g.