{"id":34528896,"url":"https://github.com/linuxfoundation/cdn-maintenance-toggle","last_synced_at":"2026-05-19T16:35:49.678Z","repository":{"id":231471215,"uuid":"781812519","full_name":"linuxfoundation/cdn-maintenance-toggle","owner":"linuxfoundation","description":"Python script to deploy/remove Cloudfront maintenance pages","archived":false,"fork":false,"pushed_at":"2024-12-09T21:49:02.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-09T22:33:49.224Z","etag":null,"topics":[],"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/linuxfoundation.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-04T04:53:15.000Z","updated_at":"2024-12-09T21:49:07.000Z","dependencies_parsed_at":"2024-05-04T05:25:48.511Z","dependency_job_id":"9e2eb436-bfd3-43ae-997d-efa7b1c1d8a5","html_url":"https://github.com/linuxfoundation/cdn-maintenance-toggle","commit_stats":null,"previous_names":["linuxfoundation/cdn-maintenance-toggle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuxfoundation/cdn-maintenance-toggle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Fcdn-maintenance-toggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Fcdn-maintenance-toggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Fcdn-maintenance-toggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Fcdn-maintenance-toggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxfoundation","download_url":"https://codeload.github.com/linuxfoundation/cdn-maintenance-toggle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Fcdn-maintenance-toggle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33224688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"ssl_error","status_checked_at":"2026-05-19T15:49:22.917Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2025-12-24T05:26:07.860Z","updated_at":"2026-05-19T16:35:49.673Z","avatar_url":"https://github.com/linuxfoundation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDN maintenance toggle script\n\nThis script disables or enables CDN services operating on AWS Cloudfront by\nsetting them into maintenance mode, implemented as a Cloudfront edge function\nreturning an HTML maintenance page.\n\nFeatures include:\n\n- Wildcard Domain Matching: Specify matching domain wildcards to limit affected\n  Cloudfront services in the current AWS account/region.\n- IP Whitelisting: Provide IP addresses that are allowed to bypass the outage\n  page for a disabled site.\n- Custom Maintenance Page: Specify a custom HTML template for the outage page.\n\nFor more details, run the script with the `--help` option.\n\n## Setup \u0026 usage for Linux Foundation / LFX sites\n\nRun the script with the `uv` project manager, which handles both Python version\nmanagement and dependencies (Python virtual environments).\n\nThe script relies on the environment to provide AWS authentication and\ndetermine which account to connect to. Export the `AWS_PROFILE` environment\nvariable, or run the script with `aws-vault`, depending on your setup.\n\n```bash\nuv run cdn_maintenance_toggle.py --template lfx-maintenance.html -v \\\n  --disable-sites \"*.platform.linuxfoundation.org\" \"*.lfx.dev\"\nuv run cdn_maintenance_toggle.py -v \\\n  --enable-sites \"*.platform.linuxfoundation.org\" \"*.lfx.dev\"\nuv run cdn_maintenance_toggle.py --cleanup\n```\n\n## Customization\n\nThe HTML template `lfx-maintenance.html` is used to display a maintainance\nmessage when CDN servers are disabled. It provided as an example of an outage\npage used by the Linux Foundation for LFX Platform maintanance. Remove any\nLinux Foundation / LFX branding before using this with any other sites.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfoundation%2Fcdn-maintenance-toggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxfoundation%2Fcdn-maintenance-toggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfoundation%2Fcdn-maintenance-toggle/lists"}