{"id":20608525,"url":"https://github.com/rishang/aws-autoscale-warmup","last_synced_at":"2026-04-24T20:31:42.621Z","repository":{"id":104086677,"uuid":"447232245","full_name":"Rishang/aws-autoscale-warmup","owner":"Rishang","description":"Aws custom one time shedules for autoscaleing ec2 and ecs services","archived":false,"fork":false,"pushed_at":"2022-02-20T03:32:04.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-09T00:28:10.494Z","etag":null,"topics":["automation","autoscaling","aws","ec2","fargate","serverless"],"latest_commit_sha":null,"homepage":"","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/Rishang.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":"2022-01-12T13:39:17.000Z","updated_at":"2022-10-11T09:33:17.000Z","dependencies_parsed_at":"2023-07-01T18:45:41.174Z","dependency_job_id":null,"html_url":"https://github.com/Rishang/aws-autoscale-warmup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rishang/aws-autoscale-warmup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Faws-autoscale-warmup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Faws-autoscale-warmup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Faws-autoscale-warmup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Faws-autoscale-warmup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rishang","download_url":"https://codeload.github.com/Rishang/aws-autoscale-warmup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rishang%2Faws-autoscale-warmup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32239483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: 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":["automation","autoscaling","aws","ec2","fargate","serverless"],"created_at":"2024-11-16T10:10:54.534Z","updated_at":"2026-04-24T20:31:42.607Z","avatar_url":"https://github.com/Rishang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autoscaling warmup for ec2/fargate\n\n---\n\n# Problem statement\n\n---\n\nThere are 2 parts in order to perform this process\n\n1. `rulegen` serverless code to shedule cloudwatch events for autoscaling.\n\n2. `rulegen-scale` serverless code which gets invoked by `rulegen` cloudwatch rules to perform autoscaling on defined autoscaling groups.\n\n## logical flow\n\n- sheduled events for multiple resource and time, autoscaling will be defined by use in for of json as the syntax defined in [rulegen](https://github.com/Rishang/onetime-aws-autoscale/tree/main/event_rule_gen)\n\n- This json will be uploaded to s3 bucket, before uploading bucket-arn and file name has to be defined in `serverless.yml` file as defined in [rulegen](https://github.com/Rishang/onetime-aws-autoscale/tree/main/event_rule_gen)\n\n- On s3 bucket put event for that file `rulegen` lambda will generate cloudwatch event rules based on shedules and minimum count defined in json file by the user.\n\n- This rules will trigger next lambda [rulegen-scale](https://github.com/Rishang/onetime-aws-autoscale/tree/main/scale) which will perform task of modifing autoscaling minimum count of ec2/fargate and after updating autoscaling count, event rule will be removed as it was been made to run once only.\n\n\n## Flow Diagram\n\n![Diagram flow](https://raw.githubusercontent.com/Rishang/onetime-aws-autoscale/4c189bf643089604007a774c68184718603e1416/.github/images/customAutoScaling.svg)\n\n## prerequisite\n1. [Nodejs](https://nodejs.org/en/)\n2. [npm](http://npmjs.org/install.sh)\n\nTo install nodejs [click here](https://github.com/nodesource/distributions)\n\n---\n\n## Steps for implementation\n\n1. Install serverless on your local device.\n        \n    - `sudo npm install -G serverless`\n\n    - Now inside git repo directory run: `npm i -D serverless-dotenv-plugin`\n\n2. Create a s3 bucket on your aws account where you will upload your sheduled scaling json file.\n\n3. provide required example variables values at `.env.dev` file as follows\n\n        ENV_AWS_REGION=\"\u003cYOUR-REGION\u003e\"\n        ENV_AWS_PROFILE=\"\u003cYOUR-PROFILE\u003e\"\n\n        BUCKET_NAME=\"shedule-event-ec2\"\n        BUCKET_FILE=\"test.json\"\n\n4. run `serverless deploy`\n\nThis now in you aws account in s3 bucket `shedule-event-ec2` you can put scaling time shedules in file [example/shedule.json](https://github.com/Rishang/onetime-aws-autoscale/blob/main/example/shedule.json) \n\nsame can be written in yaml as well like: [example/shedule.yml](https://github.com/Rishang/onetime-aws-autoscale/blob/main/example/shedule.yml)\n\nlike follows:\n\n```yaml\n---\n- service_type: fargate\n  scaling_group_name: service/cluster-wp/fastapi\n  shedule_table:\n    date: 30/11/2021\n    shedule:\n    - start: '16:40:00'\n      end: '16:57:00'\n      count: 4\n    - start: '16:55:00'\n      end: '17:57:00'\n      count: 6\n- service_type: ec2\n  scaling_group_name: scl\n  shedule_table:\n    date: 30/11/2021\n    shedule:\n    - start: '16:10:00'\n      end: '17:37:00'\n      count: 4\n    - start: '17:35:00'\n      end: '18:57:00'\n      count: 6\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishang%2Faws-autoscale-warmup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishang%2Faws-autoscale-warmup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishang%2Faws-autoscale-warmup/lists"}