{"id":18699800,"url":"https://github.com/lily-g1/stop_start_instances","last_synced_at":"2026-05-19T10:03:47.686Z","repository":{"id":210537349,"uuid":"726810863","full_name":"Lily-G1/stop_start_instances","owner":"Lily-G1","description":"Automatically stop and start EC2 instances at scheduled times with Eventbridge + Lambda","archived":false,"fork":false,"pushed_at":"2024-08-06T18:35:39.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T02:52:20.440Z","etag":null,"topics":["aws","cloud-services","cost-optimization","devops","ec2","event-driven","eventbridge","iac","infrastructure-as-code","lambda-functions","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lily-G1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-12-03T13:26:33.000Z","updated_at":"2024-08-06T18:35:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"34aedfd6-d676-4f5c-a6d4-0316f719df8d","html_url":"https://github.com/Lily-G1/stop_start_instances","commit_stats":null,"previous_names":["lily-g1/stop_start_instances"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lily-G1/stop_start_instances","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fstop_start_instances","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fstop_start_instances/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fstop_start_instances/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fstop_start_instances/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lily-G1","download_url":"https://codeload.github.com/Lily-G1/stop_start_instances/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fstop_start_instances/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274031805,"owners_count":25210784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","cloud-services","cost-optimization","devops","ec2","event-driven","eventbridge","iac","infrastructure-as-code","lambda-functions","terraform"],"created_at":"2024-11-07T11:34:25.731Z","updated_at":"2026-05-19T10:03:47.638Z","avatar_url":"https://github.com/Lily-G1.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stop_start_instances  \n## Automate the stop \u0026 start of EC2 instances to optimize costs    \n\nThis code stops running instances at 5pm and starts them at 9am every weekday (Mon - Fri). Lambda runs the actual python functions that start and stop instances, while Eventbridge sets a schedule and triggers the Lambda functions at specified times. With an automation strategy such as this, you can effectively reduce AWS expenditure without compromise on performance or functionality.  \n\n![stop_start drawio (1)](https://github.com/Lily-G1/stop_start_instances/assets/104821662/2e0feeee-50d1-45ea-8b51-89d0af1252d2)  \n\n## Prerequisites\n- An AWS account  \n- Terraform installed on your local system  \n- One or more running AWS instances  \n\n## To run:  \n- Clone this repo  \n- Enter root directory: ```cd stop_start_instances```        \n- Enter AWS instances' IDs in .py files  \n- Edit the cron expressions in eventbridge.tf to specify your time schedules  \n- ```terraform init```\n- ```terraform plan```\n- ```terraform apply```\n\n## To destroy:  \n- ```terraform destroy```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-g1%2Fstop_start_instances","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flily-g1%2Fstop_start_instances","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-g1%2Fstop_start_instances/lists"}