Skip to content

gvu0110/delete_s3_objects_golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

delete_s3_object_golang

  1. Run AWS CLI to save objects to results.json file
aws s3api list-objects --bucket <BUCKET_NAME> > results.json
  1. The script will find older-than-28-day files which have extension .png, not .pdf and .csv, with an assumption that all files not having file extension are PNG files
go mod init
go mod tidy
go run main.go
  1. Run go script with flag --dryrun=false to find the actual PNG files in the bucket and delete all PNG files
go run main.go --dryrun=false

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages