Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Associate different functions with multiple CacheBehaviors? #5

Closed
brettneese opened this issue Nov 6, 2017 · 3 comments
Closed

Associate different functions with multiple CacheBehaviors? #5

brettneese opened this issue Nov 6, 2017 · 3 comments

Comments

@brettneese
Copy link

We have multiple Lambda@Edge functions that operate based on different paths (specified through different CacheBehaviors.) In other words, path pattern /blah is associated with a cache behavior that runs a Lambda function, BlahLambdaFunction while path pattern /blerg.jpg is associated with a different CacheBehavior that is tied to BlergLambdaFunction.

Is this not yet supported by the plugin? When I tried to use it it just updated by default CacheBehavoir. 😳

@brettneese brettneese changed the title Multiple cache behavoirs Associate different functions with multiple CacheBehavoirs? Nov 6, 2017
@alexcasalboni
Copy link

Looking at the code, it seems like the plugin will always associate the Lambda Function to all the CacheBehaviors of the distribution. It sounds like a safe assumption, but it does not cover your use case, @brettneese.

@jthomerson I guess such a use case would require specifying an additional (optional) parameter for each Lambda Function, to match a specific cache behavior. What do you think?

@jthomerson
Copy link
Member

I think this is a great feature for version 2.0, which is in the works. More info coming soon.

@jthomerson jthomerson changed the title Associate different functions with multiple CacheBehavoirs? Associate different functions with multiple CacheBehaviors? Apr 10, 2018
@jthomerson
Copy link
Member

@brettneese @alexcasalboni FYI: 2.0.0 was just released that includes this. Let us know if you see any issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants