{"id":13494937,"url":"https://github.com/lohanbodevan/light-switch","last_synced_at":"2025-03-28T15:32:09.994Z","repository":{"id":26103154,"uuid":"105841273","full_name":"lohanbodevan/light-switch","owner":"lohanbodevan","description":"Toggle your EC2 instance to start or stop without have to configure and mantain cron jobs","archived":false,"fork":false,"pushed_at":"2022-02-21T19:50:58.000Z","size":15,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-31T09:37:18.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/lohanbodevan.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}},"created_at":"2017-10-05T02:26:41.000Z","updated_at":"2023-03-08T16:44:36.000Z","dependencies_parsed_at":"2022-08-07T11:16:23.835Z","dependency_job_id":null,"html_url":"https://github.com/lohanbodevan/light-switch","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lohanbodevan%2Flight-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lohanbodevan%2Flight-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lohanbodevan%2Flight-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lohanbodevan%2Flight-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lohanbodevan","download_url":"https://codeload.github.com/lohanbodevan/light-switch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246053853,"owners_count":20716271,"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","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":"2024-07-31T19:01:29.649Z","updated_at":"2025-03-28T15:32:09.653Z","avatar_url":"https://github.com/lohanbodevan.png","language":"Python","readme":"# Light Switch \u003ca href=\"https://travis-ci.org/lohanbodevan/light-switch\"\u003e\u003cimg alt=\"Travis Status\" src=\"https://travis-ci.org/lohanbodevan/light-switch.svg?branch=master\"\u003e\u003c/a\u003e [![Coverage Status](https://coveralls.io/repos/github/lohanbodevan/light-switch/badge.svg)](https://coveralls.io/github/lohanbodevan/light-switch)\nToggle your [EC2](https://aws.amazon.com/ec2/) and [RDS](https://aws.amazon.com/rds/) instances to start or stop without having to configure and mantain cron jobs.  \nThe goal of this project is to provide some automation for instances that have to be turned on and off regularly (eg. development or staging envinronments).  \nThis project is a simple [serverless](https://en.wikipedia.org/wiki/Serverless_computing) application prepread to run with [AWS Lambda](https://aws.amazon.com//lambda)  \n\n## How it Works\nThis application will look for EC2 instances ids in `instances.json` and RDS instaces ids in `rds_instances.json` file. With these ids, the application will  \nget each instance state and change to the oposite.  \nFor example, if the instance state is `running` the application will change to `stopped` based on a schedule previously configured.\n\n## Cloud Services Available\n* AWS\n\n## Requirements\n* Python 3.6\n* [Serverless](https://serverless.com/)\n\n## Configurations\n### Env vars\nConfigure your env vars in `serverless.yml` file in `custom` section.  \nThe schedule configuration is also in `serverless.yml` file.\n\n### EC2 Instances file\nConfigure your EC2 instances ids in `instances.json`. See example in `instances.json.default`\n\n### RDS Instances file\nConfigure your RDS instances ids in `rds_instances.json`. See example in `rds_instances.json.default`\n\n## Using Serverless\n### Install\n```\nnpm install -g serverless\n```\n\n### Deploy to Cloud\n```\nsls deploy\n```\n\nObs.: You must configure your [credentials](http://docs.aws.amazon.com/cli/latest/topic/config-vars.html) to work with `serverless`.\n\n## Run tests\n```\nmake tests\n```\n\n## TODO\n* Prepare for others cloud services\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flohanbodevan%2Flight-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flohanbodevan%2Flight-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flohanbodevan%2Flight-switch/lists"}