aws-amplify / aws-amplify/amplify-cli

Cleanup resources when removing predictions

Open
#12,089 4 comments 0 reactions 0 assignees View on GitHub
bug p3 platform predictions
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Is this feature request related to a new or existing Amplify category?

interactions

### Is this related to another service?

Storage, function

### Describe the feature you'd like to request

Amplify CLI does not cleanup resources such as function and bucket when removing resources.

To reproduce:
1. amplify add predictions
2. select identify
3. select advanced flow with collections as yes and allow users to add images to storage
4. amplify remove predictions
5. observe the lambda function and bucket still present

```
? What would you like to identify? Identify Entities
? Would you like use the default configuration? Advanced Configuration
? Would you like to enable celebrity detection? Yes
? Would you like to identify entities from a collection of images? Yes
? How many entities would you like to identify 50
? Would you like to allow users to add images to this collection? Yes
? Who should have access? Auth and Guest users
? The CLI would be provisioning an S3 bucket to store these images please provide bucket name: mybucket
```

### Describe the solution you'd like

automatically remove resources to prevent any dangling or unused resources that may cause additional costs

### Describe alternatives you've considered

remove manually

### Additional context

_No response_

### Is this something that you'd be interested in working on?

- [ ] 👋 I may be able to implement this feature request

### Would this feature include a breaking change?

- [ ] ⚠️ This feature might incur a breaking change

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `amplify add predictions`, the advanced Identify flow, and `amplify remove predictions`. Trace the remove command's handling of the prediction resources, including the Lambda function and S3 bucket. Done means removing predictions also removes those resources without leaving dangling infrastructure.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.