{"id":20136167,"url":"https://github.com/zkfmapf123/cron-ec2","last_synced_at":"2026-02-05T07:02:06.597Z","repository":{"id":205408740,"uuid":"714157841","full_name":"zkfmapf123/cron-ec2","owner":"zkfmapf123","description":"정해진 시간에만 켜지고, 끄는 EC2 관리 프로세스","archived":false,"fork":false,"pushed_at":"2023-11-04T07:59:53.000Z","size":22623,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T11:45:18.016Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zkfmapf123.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-11-04T04:29:51.000Z","updated_at":"2023-11-04T04:41:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"2598b0e1-58ce-4418-8f0e-75b29adddc1f","html_url":"https://github.com/zkfmapf123/cron-ec2","commit_stats":null,"previous_names":["zkfmapf123/cron-ec2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zkfmapf123/cron-ec2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcron-ec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcron-ec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcron-ec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcron-ec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkfmapf123","download_url":"https://codeload.github.com/zkfmapf123/cron-ec2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkfmapf123%2Fcron-ec2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29114961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"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":[],"created_at":"2024-11-13T21:18:01.379Z","updated_at":"2026-02-05T07:02:06.579Z","avatar_url":"https://github.com/zkfmapf123.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Handling Cron-EC2\n\n## Architecture\n\n![archi](./public/archi.png)\n\n## Desc\n\n- 09:00, 18:00 까지만 동작하는 인스턴스 구조입니다.\n- aws_scheduler_schedule 의 cron 기능을 사용합니다.\n- EC2는 tag:Properties 가 \"onoff-instance\" 입니다.\n- Lambda에서는 tag:Properties 가 \"onoff-instance\" 인 Instance를 검색합니다 (추후 환경변수로 수정가능...)\n- Terraform + Lambda (Golang) 사용하여 구현합니다.\n\n## Folders\n\n```\n    infra\n        |-- ec2.tf\n        |-- event-bridge.tf\n        |-- lambda.tf\n    function\n```\n\n## Execution\n\n1. .tfvars 작성 (./infra/tfvars.examples 참고)\n2. provider.tf를 수정하여야 합니다.\n3. Terraform + Provisioning\n\n```sh\n\n    alias tf='terraform'\n\n    ## Provisioning\n    cd infra\n    tf init\n    tf plan -var-file=[tfvars file] OR Make plan\n    tf apply -var-file=[tfvars file] OR Make apply\n\n    ## Lambda Function Update\n    cd function\n    make run\n```\n\n## 혹시\n\n- Lambda에서 Timeout이 난다면, Timeout 시간을 늘려줘야 합니다 (Default 3초)\n- Slack 기능은 귀찮아서 그냥 안함\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fcron-ec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkfmapf123%2Fcron-ec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkfmapf123%2Fcron-ec2/lists"}