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

[deployer-aws-lambda]: removes all other associated lambdas from CloudFront #305

Open
thejuan opened this issue Nov 27, 2020 · 3 comments
Open

Comments

@thejuan
Copy link
Contributor

thejuan commented Nov 27, 2020

When deploying to CF, the deployer removes all associated lambdas i.e. a viewer request lambda.
In principal everything should be in the FAB, but for migrations to FAB this is problematic.

@geelen
Copy link
Contributor

geelen commented Nov 27, 2020

Ah yeah I can see how that might be a problem...

Given you're the first person to hit this, do you have a solution in-mind? The deployer needs some way of figuring out which Lambda to replace on each deploy, right? We could bail if we detect >1 lambdas already, but I'm more thinking of this case: this is the first time you've deployed a FAB and there's exactly 1 lambda there already—how do you know whether to replace that one or attach another?

I may be misunderstanding though, it's been a while since I've touched the AWS deployer stuff...

@thejuan
Copy link
Contributor Author

thejuan commented Nov 29, 2020

It looks like you pull down the config from the distribution before updating, so you can just upsert the originRequest handler in the current config.

@thejuan
Copy link
Contributor Author

thejuan commented Nov 29, 2020

It's a nice to have, now I know it replaces i'll just move to the FAB.

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

No branches or pull requests

2 participants