Do not allow user to delete Lambda Functions associated with CloudFormation stacks
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
**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
1. Go to the AWS Explorer
1. Open the CloudFormation Stack and right click on the function. Notice there is no Delete menu item (good)
1. 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
1. 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
Contributor guide
Research direction
Reproduce the issue through the AWS Explorer by comparing the CloudFormation Stack function node with the Lambda Functions node. Trace the Lambda Functions context-menu delete path and how CloudFormation associations are identified. Done means an associated function cannot be deleted through that node, with the stated error or no delete action, while unrelated functions remain deletable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- cloud, infrastructure, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100