Coder Social home page Coder Social logo

Comments (9)

dinvlad avatar dinvlad commented on May 23, 2024 1

Cool, it's working correctly after today's intrinsic fix. Thanks!

from serverless-application-model.

sanathkr avatar sanathkr commented on May 23, 2024

Did you create the security groups outside of the template? CloudFormation cannot delete resources create outside of the template. You have to do it manually until the bug is fixed

from serverless-application-model.

joekiller avatar joekiller commented on May 23, 2024

Yes they were created outside of the stack due to the issue #57

from serverless-application-model.

sanathkr avatar sanathkr commented on May 23, 2024

Yeah, then CloudFormation won't delete those resources. This is by design to let CloudFormation manage only resources that it creates

from serverless-application-model.

joekiller avatar joekiller commented on May 23, 2024

Okay I'll try creating a SG and ingress rule on the existing SG in the template and see if the ENI gets deleted. Of course #57 might still prevent this.

from serverless-application-model.

sanathkr avatar sanathkr commented on May 23, 2024

Yes, #57 is on the works. It should prevent your problem. I am closing this issue for now.

from serverless-application-model.

dinvlad avatar dinvlad commented on May 23, 2024

The problem comes even when some "external" resources (e.g. subnets) are created via a custom resource in the same stack, e.g.

VpcConfig:
  SubnetIds: !GetAtt CustomSubnets.SubnetIds
  ...

Here my CustomSubnets resource creates a few subnets and exports their IDs via SubnetIds. The attribute gets resolved correctly (!), and Lambda is created successfully.

When I delete the stack, since this Lambda references CustomSubnets, it should be deleted before the latter, and then CustomSubnets would handle Delete request successfully by deleting associated subnets.

However, upon deletion of the stack the Delete request complains that its subnets are still associated with the Lambda's ENI. So there's no way to cleanly delete the stack.

from serverless-application-model.

sanathkr avatar sanathkr commented on May 23, 2024

Did you give your Lambda permission to delete the ENI? Checkout - http://docs.aws.amazon.com/lambda/latest/dg/vpc.html

from serverless-application-model.

dinvlad avatar dinvlad commented on May 23, 2024

Yes, it is assigned AWSLambdaVPCAccessExecutionRole

from serverless-application-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.