Deploy deletes VPC Lambda settings

If I deploy my Lambda via sls deploy, then I lose the VPC settings and have to manually configure them. This doesn’t happen every time… maybe like 50% of the time. Here’s the gist of my Lambda function yml (subnet and security group IDs obscured because I assume that’s a security risk to divulge them… happy to include the full version if that’s not a security issue):

  handler: reset.handler.reset
  vpc:
    securityGroupIds:
      - sg-xxx1
    subnetdIds:
      - subnet-xxx1
      - subnet-xxx2
  timeout: 30
  package:
    exclude:
      - ./**
    include:
      - reset/__init__.py
      - reset/handler.py
      - common/**

Oh, I think this might be an IAM permission issue… I’ll probably need to add these permissions:

- Effect: Allow
              Action:
                - ec2:CreateNetworkInterface
                - ec2:DescribeNetworkInterfaces
                - ec2:DeleteNetworkInterface
              Resource: "*"