{"id":22538095,"url":"https://github.com/cfpb/hubot-aws-cfpb","last_synced_at":"2025-04-09T20:14:57.491Z","repository":{"id":57268681,"uuid":"57895735","full_name":"cfpb/hubot-aws-cfpb","owner":"cfpb","description":"Manage your AWS EC2 instances from Hubot","archived":false,"fork":false,"pushed_at":"2020-08-20T20:40:23.000Z","size":2096,"stargazers_count":4,"open_issues_count":0,"forks_count":12,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-23T22:11:21.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cfpb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-02T14:24:14.000Z","updated_at":"2020-08-20T20:40:25.000Z","dependencies_parsed_at":"2022-09-02T05:41:16.926Z","dependency_job_id":null,"html_url":"https://github.com/cfpb/hubot-aws-cfpb","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fhubot-aws-cfpb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fhubot-aws-cfpb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fhubot-aws-cfpb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cfpb%2Fhubot-aws-cfpb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cfpb","download_url":"https://codeload.github.com/cfpb/hubot-aws-cfpb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653643,"owners_count":20973872,"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-12-07T11:10:08.732Z","updated_at":"2025-04-09T20:14:57.472Z","avatar_url":"https://github.com/cfpb.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# hubot-aws-cfpb\n\nThis is a Hubot plugin. \nWe use this module for running a small subset of AWS ec2 commands via chat. \n\n## Credit \u0026 divergence\n\nThis project was originally a fork of https://github.com/yoheimuta/hubot-aws. \nWe removed significant functionality from the original application, diverged in the command format, and added, removed, \nand enhanced the commands for our specific purposes. \n\n## Contributing\n\nThese changes are quite specific to our usage and highly unlikely to be reusable.\n\nMore generic, reusable contributions should be made to https://github.com/yoheimuta/hubot-aws, not here.\n\nContributions specific to our usage can be made here. See [CONTRIBUTING](CONTRIBUTING.md)\n\n## Configuration\n\nSee [INSTALL](INSTALL.md)\n\n## Commands\n\n### List Instances\n\n#### Chat and my Instances\n```\ncfpbot ec2 [mine|chat]\n```\nThis command will list the instances created by chat bot. \n* mine - will list all instances you have created\n* chat - will list all instances that the chat bot has created.\n\n#### Filter instances\n```\ncfpbot ec2 filter [search_text]\n```\nThis command will show all instances that have the 'search_text' in the name.\n\n### Creating, Stopping \u0026 Extending\n\n#### Create Instances\n```ruby\ncfpbot ec2 run [name] [desc] \n```\nThis command will create a new ec2-instance. \n* name - The tag name that will be given to this ec2 instance.\n* desc - The tag desc that will be given to this ec2 instance\n\n#### Stop Instances\n```ruby\ncfpbot ec2 stop --instance_id=[instance_id]\n```\nThis command will stop, not terminate, an ec2-instance of a given id. It will only allow you to stop instances that you created. \n* instance_id - The instance id of the ec2 instance which you can get from the `List Instances` commands.\n\n#### Resume Instances\n```ruby\ncfpbot ec2 start [instance_id]\n```\nThis command will start an ec2-instance of a given id. \n* instance_id - The instance id of the ec2 instance which you can get from the `List Instances` commands.\n\n#### Extend an Instance's Expiration Date\n```ruby\ncfpbot ec2 extend [instance_id]\n```\nThis command will add two weeks to the expiration date of an ec2-instance created by cfpbot.\n* instance_id - The instance id of the ec2 instance which you can get from the `List Instances` commands.\n\n### Reserve instances\n\n```\ncfpbot ec2 reserve [instance_id_nickname] [branch name] [reservation comment]\ncfpbot ec2 unreserve [instance_id_nickname]\ncfpbot ec2 reserve-ls\n```\n\nThese three commands help coordinate ad hoc reservations of shared EC2 instances\nwithin a team or department. Consider a scenario where a team has a set of three\nstaging/QA boxes that have topic branches deployed to them: coordinating\nwho is using what can quickly become painful. These commands attempt to help\nwith this problem by using EC2 tags to track the state of a pre-defined set of\nreservable instances.\n\nDefine your instances-for-reservation in a JSON file kept in the bot's root (\npoint the bot to this file via the `HUBOT_AWS_RESERVE_CONFIG` env var):\n\n```json\n{\n  \"staging1\": \"i-EC2-INSTANCE-ID-HERE\",\n  \"staging2\": \"i-EC2-INSTANCE-ID-HERE\",\n  \"staging3\": \"i-EC2-INSTANCE-ID-HERE\",\n}\n```\n\nYou'd then reserve an instance like:\n\n```\ncfpbot ec2 reserve staging1 my-branch-name testing this new cool feature\n```\n\nWhen you are done testing:\n\n```\ncfpbot ec2 unreserve staging1\n```\n\nCheck the status of the instances to see what's available:\n\n```\ncfpbot ec2 reserve-ls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fhubot-aws-cfpb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcfpb%2Fhubot-aws-cfpb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcfpb%2Fhubot-aws-cfpb/lists"}