Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow user to delete Lambda Functions associated with CloudFormation stacks #502

Open
awschristou opened this issue Apr 22, 2019 · 1 comment
Labels
bug We can reproduce the issue and confirmed it is a bug. lambda service:cloudformation

Comments

@awschristou
Copy link
Contributor

Describe the bug

It should not be possible to delete a Lambda Function that belongs to a CloudFormation stack. This was overlooked during #190.

To Reproduce

  1. Create a CloudFormation Stack that contains a Lambda Function
  2. Go to the AWS Explorer
  3. Open the CloudFormation Stack and right click on the function. Notice there is no Delete menu item (good)
  4. Locate the "Lambda Functions" node for the same function, and right click on it. Notice there is a Delete menu item (bad). Delete the Lambda Function
  5. Function gets deleted

Expected behavior

It should not be possible to delete the function.

  • Ideal: the context menu does not appear on these nodes
  • Next best: an error message is shown indicating that the function cannot be deleted because it is associated with (insert CloudFormation Stack name here)

Desktop (please complete the following information):

  • OS: Win
  • Visual Studio Code Version: 1.33
  • AWS Toolkit for Visual Studio Code Version: 0.1.1
@awschristou awschristou added the bug We can reproduce the issue and confirmed it is a bug. label Apr 22, 2019
@awschristou
Copy link
Contributor Author

Lambda Function tags can be queried for the presence of the following:

aws:cloudformation:stack-name
aws:cloudformation:stack-id
aws:cloudformation:logical-id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. lambda service:cloudformation
Projects
None yet
Development

No branches or pull requests

2 participants