[AWS] Hey everyone, i'm want to implement a Pulumi...
# general
r
[AWS] Hey everyone, i'm want to implement a Pulumi resource that creates a Lambda@Edge function that is attached to a Cloudfront distribution and handles
viewer-request
events (the use case being that I want to implement Basic Authentication for a site that is still being prepared for launch). Is there an example around for that exact use case? I've seen a GitHub issue mentioning that use case and that the
aws-ts-static-website
describes using an edge function for a different purpose. If not I will just go from there 😉
Hmm I just realized that the example is even handling the aforementioned event. So that shouldn't be a big problem to convert into what I need ...
g
I recently built something like this with terraform (image resizing on demand), I haven't yet converted it to pulumi. One thing that caught me off guard - edge lambdas have to be in the us east region. Also I ran into some weirdness trying to destroy/update the lambda because it is propagated across the cdn so it behaves differently
r
Thanks, I'll keep that in mind when creating the lambda!