medikoo / serverless-plugin-vpc-eni-cleanup

Cleanup of VPC network interfaces on stage removal
MIT License
20 stars 9 forks source link

How to debug this plugin? #5

Closed jamesla closed 4 years ago

jamesla commented 4 years ago

I have followed the install steps and installed the plugin

npm install serverless-plugin-vpc-eni-cleanup

added the plugin to plugins in serverless.yml

plugins:
 - serverless-plugin-vpc-eni-cleanup

and have added the various permissions to my iam policy.

However when I perform a sls remove -v -s dev it still takes around 15 minutes. There isn't any output from this plugin so I'm not sure that it's even working properly.

Is there a way to debug?

medikoo commented 4 years ago

You may use SLS_DEBUG=* and then Framework will list all plugins it loaded.

Otherwise plugin logs all detached interfaces on the go: https://github.com/medikoo/serverless-plugin-vpc-eni-cleanup/blob/26d1e6f6a151a96f736ce237e18a01469d37e163/index.js#L58-L63

If that's not enough you may just try to add some sanity logs manually to node_modules/erverless-plugin-vpc-eni-cleanup at least at this point there are no better debug means implemented into plugin.

jamesla commented 4 years ago

ok thanks debug worked - it still takes up to 20 minutes to delete but at least it does delete. Hopefully AWS looks at fixing this soon!