getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
912 stars 109 forks source link

Define PriceClass for CloudFront distribution #363

Closed jaulz closed 9 months ago

jaulz commented 10 months ago

Start from the Use-case

It would be nice to define the price class for the Cloud Front distribution in order to save costs for unnecessary locations.

Example Config

No response

Implementation Idea

No response

mnapoli commented 9 months ago

That could be achieved via extensions, I'm not sure we'll want to add an option for that given the low demand for this.

jaulz commented 9 months ago

@mnapoli thanks for your feedback. Actually, I thought the same but since the name of the CloudFront distribution is dynamic (i.e. appCDNXXXXXXX) I cannot modify it via extensions?

mnapoli commented 9 months ago

I meant something like this: https://github.com/getlift/lift#extend-lift-constructs Does that help?

jaulz commented 9 months ago

Ah, thanks a lot and sorry that I missed that piece! Will give it a try but I am confident that this will solve the issue 😊