https://pulumi.com logo
#general
Title
# general
r

rapid-eye-32575

04/18/2019, 11:11 AM
[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

gray-elephant-37695

04/18/2019, 12:27 PM
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

rapid-eye-32575

04/18/2019, 2:22 PM
Thanks, I'll keep that in mind when creating the lambda!
5 Views