{"id":16744820,"url":"https://github.com/marteinn/sms-server-remote","last_synced_at":"2025-03-16T01:40:48.786Z","repository":{"id":67213933,"uuid":"62926643","full_name":"marteinn/sms-server-remote","owner":"marteinn","description":"Trigger fabric tasks on your server through SMS and AWS Lambda.","archived":false,"fork":false,"pushed_at":"2016-07-09T14:28:10.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T14:24:51.499Z","etag":null,"topics":["lambda","serverless","twilio"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marteinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-07-09T01:37:53.000Z","updated_at":"2016-07-09T14:28:08.000Z","dependencies_parsed_at":"2023-02-21T07:46:01.018Z","dependency_job_id":null,"html_url":"https://github.com/marteinn/sms-server-remote","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marteinn%2Fsms-server-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marteinn%2Fsms-server-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marteinn%2Fsms-server-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marteinn%2Fsms-server-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marteinn","download_url":"https://codeload.github.com/marteinn/sms-server-remote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814907,"owners_count":20352037,"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":["lambda","serverless","twilio"],"created_at":"2024-10-13T01:44:12.300Z","updated_at":"2025-03-16T01:40:48.767Z","avatar_url":"https://github.com/marteinn.png","language":"Python","readme":"# SMS-Server-Remote\nThis is a experiment based on [Twilio](https://twilio.com) and [Serverless](http://serverless.com) that lets you trigger fabric tasks on your server through SMS.\n\n## Getting started\n- [Install serverless](: `npm install serverless -g`)\n- Setup project on AWS (just follow the serverless instructions)\n- Update dependencies: `make update_dependencies`\n- Write your own fabfile and server handling, store it in `src/incoming/sms/config` (I have included a example for clarification)\n- Deploy the function and endpoint `incoming_sms`\n- Create a Twilio TwiML app that handles SMS messaging, use your lambda endpoint as request url with HTTP GET\n\n## Usage\n- Send a SMS with your fabric command to your Twilio phone number (example: `prod restart_apache`)\n- Sends back something like this:\n\n    ```\n    service apache restart\n    restarting apache..\n    restart complete!\n    ```\n- _Please note: Fabric taks that takes longer then 15 seconds are not sent back to Twilio (due to Twilio timeout limitations)_\n\n## Endpoints: incoming_sms\nThe endpoint incoming_sms requires the following params:\n\n- `Body` (SMS message body delivered from Twilio)\n- `From` (Phone number delivered from Twilio)\n- `secret` (A simple auth token)\n\nExample:\n\n```\ncurl -X \"GET\" \"https://XXXXX.execute-api.eu-west-1.amazonaws.com/stage/incoming_sms?Body=mp%20info\u0026From=%2B46000000\u0026secret=myscret\"\n```\n\nReturns:\n\n```\n\u003cResponse\u003e\n  \u003cMessage\u003e\n    \u003cBody\u003e\u003c![CDATA[cat /etc/*-release\nDISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=14.04\nDISTRIB_CODENAME=trusty\nDISTRIB_DESCRIPTION=\"Ubuntu 14.04.4 LTS\"\nNAME=\"Ubuntu\"\nVERSION=\"14.04.4 LTS, Trusty Tahr\"\nID=ubuntu\nID_LIKE=debian\nPRETTY_NAME=\"Ubuntu 14.04.4 LTS\"\nVERSION_ID=\"14.04\"\nHOME_URL=\"http://www.ubuntu.com/\"\nSUPPORT_URL=\"http://help.ubuntu.com/\"\nBUG_REPORT_URL=\"http://bugs.launchpad.net/ubuntu/\"]]\u003e\u003c/Body\u003e\n  \u003c/Message\u003e\n\u003c/Response\u003e\n```\n## Git hooks\n\n### Bump version\n\nThese hooks will automatically bump the application version when using `git flow release ...`\n\n```\nchmod +x $PWD/git-hooks/bump-version.sh\nln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-release-start\nln -nfs $PWD/git-hooks/bump-version.sh .git/hooks/post-flow-hotfix-start\n```\n\n## Commands\n- Deploy function: `npm run serverless function deploy -a`\n- Deploy endpoint: `npm run serverless endpoint deploy -a`\n- Deploy: `npm run serverless dash deploy`\n\n## Dependencies\n- https://github.com/Doerge/awslambda-pycrypto\n\n### References\n- http://docs.serverless.com/docs/templates-variables\n- http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html\n\n### Tutorials/Examples\n- https://serverlesscode.com/post/python-on-serverless-intro/\n- https://www.twilio.com/docs/quickstart/php/sms/hello-monkey\n- https://github.com/mauerbac/lambda-gateway-twilio-demo/blob/master/lambda_function.py\n- https://www.twilio.com/blog/2015/11/sending-selfies-without-servers-how-to-use-twilio-mms-amazon-lamba-and-amazons-gateway.html\n\n## Contributing\nWant to contribute? Awesome. Just send a pull request.\n\n## License\nsms-server-remote is released under the [MIT License](http://www.opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarteinn%2Fsms-server-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarteinn%2Fsms-server-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarteinn%2Fsms-server-remote/lists"}