Skip to content

Batch Delete Image for ECR with Multiple Image Digests #3261

Discussion options

You must be logged in to vote

I got it working now. It was expecting a list of dictionaries for the imageIds argument. Below is my code.

imgDigestList = []
for img in imgList:
imgDigestDict = {}
imgDigestDict['imageDigest'] = img['imageDigest']
imgDigestList.append(imgDigestDict)

delResp = client.batch_delete_image(registryId = accountId, repositoryName = repo['repoName'], imageIds = imgDigestList)

Thanks a lot once again for your help.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tim-finnigan
Comment options

@vesubramanian
Comment options

Comment options

You must be logged in to vote
1 reply
@tim-finnigan
Comment options

Answer selected by tim-finnigan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants