Droplr / serverless-api-cloudfront

Serverless Plugin - CloudFront distribution in front of your API Gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It doesn't work with serverless 3.0

faradaytrs opened this issue · comments

It deleted my cloudfront distribution after update to serverless 3 and doesn't create a new one.

I have the same problem.

I'm having the same issue

I have bumped a few dependencies and upgraded the Serverless hooks in use to the latest spec and it seems to be working fine for Serverless 3.0 now. See the gist of it here.

This repo on the other hand is no longer maintained. I am not sure if this plugin has much use, but I guess we can discuss maintainability if need be. At least one could move over to a forked version if someone is willing to maintain it ? Also, sorry if this is already being tracked in some other issue 👍

I have bumped a few dependencies and upgraded the Serverless hooks in use to the latest spec and it seems to be working fine for Serverless 3.0 now. See the gist of it here.

Hi @frcouceiro, is there any way I can profit of your fixes and make use of your version of the plugin? How did you make it work for your project? I'm not that familiar with npm modules to figure out how to fix it locally (?) or in any other way.

Hi there @Sillium I think you can load a plugin from within your project file structure, something along these lines in your servereless.yml:

 plugins:
  - ./local-directory/custom-serverless-plugin

You can then git clone my fork: https://github.com/appsconcept/serverless-api-cloudfront and use it locally on your project.

Other option would be to point your package.json to use my fork directly, but you'd be coupled with my repo and given it is a company repo I am not sure it will last as long as your needs, so I guess, in this case, using a local plugin would be easier in the long run.

Hi there @Sillium I think you can load a plugin from within your project file structure, something along these lines in your servereless.yml:

 plugins:
  - ./local-directory/custom-serverless-plugin

You can then git clone my fork: https://github.com/appsconcept/serverless-api-cloudfront and use it locally on your project.

Thank you very much, I wasn't aware I can reference plugins locally.

In the meantime I created PR #48. If it is accepted maybe a new version can be released and then used directly from npm as usual 🤞