{"id":19772053,"url":"https://github.com/danieldacosta/aws-serverless-bot","last_synced_at":"2025-02-28T04:44:18.437Z","repository":{"id":112640934,"uuid":"512285330","full_name":"DanielDaCosta/aws-serverless-bot","owner":"DanielDaCosta","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-18T01:33:47.000Z","size":566,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T01:10:38.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/DanielDaCosta.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-07-09T21:03:58.000Z","updated_at":"2022-07-09T22:16:03.000Z","dependencies_parsed_at":"2023-06-10T07:00:39.138Z","dependency_job_id":null,"html_url":"https://github.com/DanielDaCosta/aws-serverless-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielDaCosta%2Faws-serverless-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielDaCosta%2Faws-serverless-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielDaCosta%2Faws-serverless-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielDaCosta%2Faws-serverless-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielDaCosta","download_url":"https://codeload.github.com/DanielDaCosta/aws-serverless-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241101665,"owners_count":19909943,"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-11-12T05:05:16.027Z","updated_at":"2025-02-28T04:44:18.432Z","avatar_url":"https://github.com/DanielDaCosta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-serverless-bot\n\n\n# Discord\n## Create Command\nRun `register.js`  file to create the following slash commands: \n- list_ec2: List all EC2 on RUNNING state\n- stop_ec2: Stop the provided EC2 name\n\n## List Command\nRun `get-commands.js` to get a list of all the created commands. A helpful command for finding out the commands IDs.\n\nOutput example: \n```bash\n[\n  {\n    id: 'COMMAND_ID',\n    application_id: 'YOUR_APPLICATION_ID',\n    version: '995450447986962475',\n    default_permission: true,\n    default_member_permissions: null,\n    type: 1,\n    name: 'list_ec2',\n    description: 'replies with bar ;/',\n    guild_id: 'YOUR_GUILD_ID'\n  },\n  {\n    id: 'COMMAND_ID',\n    application_id: 'YOUR_APPLICATION_ID',\n    version: '995455491415216159',\n    default_permission: true,\n    default_member_permissions: null,\n    type: 1,\n    name: 'stop_ec2',\n    description: 'Stop EC2 instances',\n    guild_id: 'YOUR_GUILD_ID',\n    options: [ [Object] ]\n  }\n]\n```\n## Delete Command\nRun `delete-commands.js` to delete a specif command, it takes as input the command ID.\n\nChange COMMAND_ID variable before running it.\n\n# Lambda\n\nRun the following code to update your lambda function:\n- ```cd lambda-discord-bot```\n- ```zip -r lambda-discord-bot.zip .```\n- ```aws lambda update-function-code --function-name lambda-discord-bot --zip-file fileb://lambda-discord-bot.zip --region us-east-1```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldacosta%2Faws-serverless-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieldacosta%2Faws-serverless-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldacosta%2Faws-serverless-bot/lists"}