aws-amplify / aws-amplify/amplify-hosting

Amplify console does not cleanup SSR resources for failed builds (Lambda@Edge and Cloudfront)

Open
#2,794 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### App Id

_No response_

### Region

_No response_

### Amplify Hosting feature

_No response_

### Describe the bug

Hello,

After deleting Amplify project, Amplify did not delete all the Cloudfront and Lambda@Edge SSR resources, can you please help fixing this issue?

### Expected behavior

Amplify to delete Cloudfront and Lambda when the project is deleted

### Reproduction steps

1- Create many Cloudfront distribution with Lambda@Edge association to reach the account limit for Distributions per AWS account that can have Lambda@Edge functions https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html#limits-lambda-at-edge

2- Create Amplify Nextjs project.

3- Delete Amplify project

### Build Settings

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are identified in the issue. Start by reproducing the failure with an Amplify Next.js project after creating the stated CloudFront and Lambda@Edge resources; done means deleting the project removes all associated resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, next.js
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.