{"id":19853893,"url":"https://github.com/magnetikonline/aws-cloudfront-log-expire","last_synced_at":"2026-05-11T21:32:31.495Z","repository":{"id":147825602,"uuid":"54068320","full_name":"magnetikonline/aws-cloudfront-log-expire","owner":"magnetikonline","description":"Processes S3 buckets configured as CloudFront distribution access log targets - removing log objects prior to a specified expiry date or days.","archived":false,"fork":false,"pushed_at":"2022-02-09T04:52:37.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T23:29:33.026Z","etag":null,"topics":["aws","cloudfront","s3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magnetikonline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-16T21:38:05.000Z","updated_at":"2022-02-09T04:52:40.000Z","dependencies_parsed_at":"2023-05-27T15:15:34.445Z","dependency_job_id":null,"html_url":"https://github.com/magnetikonline/aws-cloudfront-log-expire","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magnetikonline/aws-cloudfront-log-expire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Faws-cloudfront-log-expire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Faws-cloudfront-log-expire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Faws-cloudfront-log-expire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Faws-cloudfront-log-expire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magnetikonline","download_url":"https://codeload.github.com/magnetikonline/aws-cloudfront-log-expire/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magnetikonline%2Faws-cloudfront-log-expire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32913634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudfront","s3"],"created_at":"2024-11-12T14:07:58.843Z","updated_at":"2026-05-11T21:32:31.475Z","avatar_url":"https://github.com/magnetikonline.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CloudFront log expire\n\nProcesses an S3 bucket configured as a [CloudFront](https://aws.amazon.com/cloudfront/) distribution access log target - removing all access log objects prior to a specified expiry date or days.\n\n- For safety, will only consider objects for deletion that meet the CloudFront access log naming format.\n- By default will only _simulate_ the processing of logs before actual removal from S3 (providing the `--commit` argument will enable actual deletes).\n- Can optionally display script processing output back to the users terminal.\n- Requires [Boto 2](https://github.com/boto/boto).\n- AWS credentials expected to be provided either via shell environment variables or the usual places [Boto will check](https://boto.cloudhackers.com/en/latest/boto_config_tut.html).\n\n## Usage\n\n```\nusage: cloudfrontlogexpire.py [-h] --s3-bucket-name NAME\n                              [--s3-bucket-log-prefix PREFIX]\n                              [--expire-before YYYY-MM-DD]\n                              [--expire-days DAY_COUNT] [--progress]\n                              [--commit]\n\nRemove AWS CloudFront access log archives from an S3 bucket before a given\ndate or number of expiry days.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --s3-bucket-name NAME\n                        S3 bucket holding CloudFront access log archives\n  --s3-bucket-log-prefix PREFIX\n                        S3 bucket path prefix to access log archives\n  --expire-before YYYY-MM-DD\n                        expire log archives before given date\n  --expire-days DAY_COUNT\n                        expire log archives older than X number of days\n  --progress            display progress of access log archive processing\n  --commit              delete access log archives, otherwise simulation only\n```\n\nNotes:\n\n- Must specify one of `--expire-before` or `--expire-days` - not both.\n- Script will *never* delete bucket objects unless the `--commit` argument is provided.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnetikonline%2Faws-cloudfront-log-expire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagnetikonline%2Faws-cloudfront-log-expire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagnetikonline%2Faws-cloudfront-log-expire/lists"}