🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

serverless-plugin-vpc-eni-cleanup

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-vpc-eni-cleanup

Cleanup lambda VPS EC2 Network Interfaces on stack removal, to speed up the operation

1.0.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

Build status Tests coverage npm version

serverless-plugin-vpc-eni-cleanup

Cleanup of VPC network interfaces on stage removal

Removal of stage (so CloudFormation stack deletion) that involves VPC lambda functions is very slow.
"Waiting for NetworkInterfaces associated with the Lambda Function to be cleaned up" process takes usually around 40 minutes.

While the AWS team works on improving that, the workaround for a meantime is to remove those interfaces manually, so stack deletion finalizes in reasonable time.

This plugin removes all detected network interfaces in parallel to stack deletion process.

Installation

npm install serverless-plugin-vpc-eni-cleanup

Configuration

Activate plugin in serverless.yml

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

Following IAM policy needs to be ensured for plugin to work without issues

{
  "Effect": "Allow",
  "Action": [
    "ec2:DeleteNetworkInterface",
    "ec2:DetachNetworkInterface",
    "ec2:DescribeNetworkInterfaces"
  ],
  "Resource": ["*"]
}

That's it. Having that, with every sls remove operation plugin will attempt to delete discovered network interfaces

Tests

npm test

Keywords

serverless

FAQs

Package last updated on 16 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts