Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Failure to Delete AWS ECR Public Repositories Containing Images using Cloud Control #1155

Closed
fridim opened this issue Nov 20, 2023 · 1 comment

Comments

@fridim
Copy link

fridim commented Nov 20, 2023

Problem Summary:
When attempting to delete AWS ECR Public Repositories that still contain images using aws-nuke (which currently uses AWS Cloud Control), the operation fails. This issue is specific to the use of the cloud-control API for AWS::ECR::PublicRepository.

cloud-control doesn't delete images inside the repository, so using cloud control in aws-nuke for AWS::ECR::PublicRepository doesn't properly work today.

Symptom:
aws-nuke loops forever

us-east-1 - AWS::ECR::PublicRepository - jboss-eap - [Identifier: "jboss-eap", RepositoryName: "jboss-eap"] - waiting

Removal requested: 1 waiting, 0 failed, 68 skipped, 0 finished

us-east-1 - AWS::ECR::PublicRepository - jboss-eap - [Identifier: "jboss-eap", RepositoryName: "jboss-eap"] - waiting

Removal requested: 1 waiting, 0 failed, 68 skipped, 0 finished
[...]

aws cloudcontrol list-resource-requests:

        {
            "TypeName": "AWS::ECR::PublicRepository",
            "Identifier": "jboss-eap",
            "RequestToken": "xxxxxxxx",
            "Operation": "DELETE",
            "OperationStatus": "FAILED",
            "EventTime": "2023-11-17T21:37:11.168000+00:00",
            "StatusMessage": "The repository with name 'jboss-eap' in registry with id 'xxxxxx' cannot be deleted because it still contains images (Service: EcrPublic, Status Code: 400, Request ID: xxxxx)",
            "ErrorCode": "GeneralServiceException"
        },
fridim added a commit to fridim/aws-nuke that referenced this issue Nov 21, 2023
@ekristen
Copy link
Contributor

ekristen commented Oct 1, 2024

I believe this might already be fixed in the fork. If not please open an issue there.

If you have a chance, please check it out and let us know if you run into an issues by opening an issue over on the fork.


Please see the copy of the notice from the README about the deprecation of this project. Sven was kind enough to grant me access to help triage and close issues and pull requests that have already been addressed in the actively maintained fork. Some additional information is located in the welcome issue for more information.

Caution

This repository for aws-nuke is no longer being actively maintained. We recommend users to switch to the actively maintained fork of this project at ekristen/aws-nuke.
We appreciate all the support and contributions we've received throughout the life of this project. We believe that the fork will continue to provide the functionality and support that you have come to expect from aws-nuke.
Please note that this deprecation means we will not be addressing issues, accepting pull requests, or making future releases from this repository.
Thank you for your understanding and support.

@ekristen ekristen closed this as completed Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants