{"id":15673711,"url":"https://github.com/lmammino/lambda-currency-exchange-sms","last_synced_at":"2025-08-23T05:36:36.481Z","repository":{"id":138310806,"uuid":"98806809","full_name":"lmammino/lambda-currency-exchange-sms","owner":"lmammino","description":"An AWS lambda function that sends you an SMS (using Twilio) with today exchange rate for a give currency pair","archived":false,"fork":false,"pushed_at":"2017-07-31T07:41:44.000Z","size":29,"stargazers_count":13,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T00:44:49.509Z","etag":null,"topics":["aws","aws-lambda","currency","exchange","exchange-rates","lambda","serverless","sms","twilio","twilio-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lmammino.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":"2017-07-30T15:31:22.000Z","updated_at":"2020-09-16T20:29:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb49bc57-6f4f-450e-8596-fb70c32b09f9","html_url":"https://github.com/lmammino/lambda-currency-exchange-sms","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"5092908cf5395b8840ee8b617ca6f2a2660ba37a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lmammino/lambda-currency-exchange-sms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Flambda-currency-exchange-sms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Flambda-currency-exchange-sms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Flambda-currency-exchange-sms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Flambda-currency-exchange-sms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmammino","download_url":"https://codeload.github.com/lmammino/lambda-currency-exchange-sms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmammino%2Flambda-currency-exchange-sms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745603,"owners_count":24813511,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aws","aws-lambda","currency","exchange","exchange-rates","lambda","serverless","sms","twilio","twilio-api"],"created_at":"2024-10-03T15:41:50.147Z","updated_at":"2025-08-23T05:36:36.452Z","avatar_url":"https://github.com/lmammino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambda-currency-exchange-sms\n\nThis a simple AWS lambda written in Node.js (\u003e= 6.10) that allows you to monitor the exchange rate of a given currency pair and get an SMS every day (through [Twilio](https://www.twilio.com) APIs).\n\n![Sample message received every day (Today you get 1.12 EUR for 1 GBP)](/image.jpg)\n\n\n## Requirements\n\nIn order to test and deploy this lambda you will need to have:\n\n- An AWS account (and a user created in it)\n- the last version of AWS CLI tool installed and configured to use your AWS account\n- Node.js (version \u003e= 6.10) and NPM installed in your machine\n- Lambda-local package installed globally in your machine (optional, only for local testing)\n- A Twilio *account*, an *Api Key* and a *source phone number* for SMS ([free plan](https://www.twilio.com) should be enough)\n\n\n## Configuration\n\nBefore being able to test and deploy this lambda you need to provided the needed configuration.\n\nConfiguration needs to be stored in a `.env` file (you can copy a template from the `.env~SAMPLE` sample file) that will look like this:\n\n```bash\nexport BUCKET=your-unique-bucket-name\nexport STACK_NAME=currency-exchange-lambda\nexport CURRENCY_FROM=\"GBP\"\nexport CURRENCY_TO=\"EUR\"\nexport TWILIO_ACCOUNT=\"abcdefghijklmnopqrstuxywz123456789\"\nexport TWILIO_API_KEY=\"1234567890abcdef1234567890abcdef\"\nexport SEND_SMS_FROM=\"+3530123456789\"\nexport SEND_SMS_TO=\"+3530234567890\"\n```\n\nWhere:\n\n - `BUCKET`: is the name of your S3 bucket that will contain the code to be deployed to AWS Lambda\n - `STACK_NAME`: the stack name for this project as it will appear in your cloudformation console\n - `CURRENCY_FROM`: The currency code from which you want to fetch the exchanges\n - `CURRENCY_TO`: The currency code to which you want to fetch the exchanges\n - `TWILIO_ACCOUNT`: Your Twilio account id\n - `TWILIO_API_KEY`: Your Twilio api key\n - `SEND_SMS_FROM`: Your Twilio source phone number\n - `SEND_SMS_TO`: Your destination phone number\n\n\n## Install dependencies\n\nTo install all the needed dependencies you simply need to run the following commands:\n\n```bash\ncd src\nnpm install\n```\n\n\n## Local testing\n\nWith [lambda-local](https://www.npmjs.com/package/lambda-local) installed and your shell in the root folder of this project, run:\n\n```bash\nsource .env # will load the current configuration through env variables\nlambda-local -l src/index.js -h handler -e event.json\n```\n\n\n## Package and Deploy\n\n### Pre-requisites\n\nBefore being able to package and deploy the application you must have created an s3 bucket in your own account. You can do that with:\n\n```bash\naws s3 mb \"s3://your-unique-bucket-name\"\n```\n\nNote: Your bucket needs to have a unique name, so you might need to spend sometime to find a unique one that works for you.\n\nOnce you have created your own bucket, be sure to update the `BUCKET` variable in your `.env` file\n\n\n### Package\n\nThe **package process** will generate a zip file containing the project source code all its dependencies and it will upload it on S3. The output of this operation will be a new cloudformation template (stored in `.cloudformation`) that can be used to deploy the application in your AWS account.\n\nTo package the application you can use the `package` script contained in this project:\n\n```bash\n./package.sh\n```\n\n### Deploy\n\nOnce your app is packaged you are ready to deploy it on AWS with the `deploy` command:\n\n```bash\n./deploy.sh\n```\n\n\n## License\n\nLicensed under [MIT License](/LICENSE). © Luciano Mammino.\n\n\n## Contributing\n\nEveryone is very welcome to contribute to this repository. Feel free to [raise issues](/issues) or to [submit Pull Requests](/pulls).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Flambda-currency-exchange-sms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmammino%2Flambda-currency-exchange-sms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmammino%2Flambda-currency-exchange-sms/lists"}