{"id":17132219,"url":"https://github.com/bitsofinfo/covid19datapuller","last_synced_at":"2025-10-23T23:15:35.925Z","repository":{"id":146758799,"uuid":"273404987","full_name":"bitsofinfo/covid19datapuller","owner":"bitsofinfo","description":"Simple serverless framework demo that pulls public data from coronavirusapi.com","archived":false,"fork":false,"pushed_at":"2020-06-21T18:29:21.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T14:51:49.124Z","etag":null,"topics":["aws-lambda","coronavirus","lambda-functions","serverless-framework"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitsofinfo.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":"2020-06-19T04:39:57.000Z","updated_at":"2020-06-21T18:29:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7507221a-fb9f-4981-876d-7cde4e9a1c77","html_url":"https://github.com/bitsofinfo/covid19datapuller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bitsofinfo/covid19datapuller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fcovid19datapuller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fcovid19datapuller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fcovid19datapuller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fcovid19datapuller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitsofinfo","download_url":"https://codeload.github.com/bitsofinfo/covid19datapuller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitsofinfo%2Fcovid19datapuller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280706869,"owners_count":26377001,"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-10-23T02:00:06.710Z","response_time":142,"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-lambda","coronavirus","lambda-functions","serverless-framework"],"created_at":"2024-10-14T19:26:24.254Z","updated_at":"2025-10-23T23:15:35.887Z","avatar_url":"https://github.com/bitsofinfo.png","language":"Python","readme":"# serverless demo\n\nThis demo will get you up and running with the [Serverless framework](https://www.serverless.com/) with an example AWS lambda (python3) function that pulls public data from http://coronavirusapi.com/ every `60` minutes, and writes it to an s3 bucket under `[bucketname]/[fetch-timestamp]/data.json`\n\n## Prerequisites\n\n* Recent version of Node\n* Python 3.x \u0026 pip 3.x\n* AWS cli w/ configured credentials with the appropriate access to create s3 buckets, lambda functions, cloudformation stacks, cloudwatch events etc.\n\n## Overview\n\n1. Clone this project and `cd covid19datapuller/`\n\n2. Install Serverless:\n```\ncurl -o- -L https://slss.io/install | bash\n```\n\n3. Install a few serverless plugins:\n```\nnpm install --save serverless-plugin-scripts\nnpm install serverless-offline --save-dev\n```\n\n4. Initialize local py modules\n```\nserverless install-mods\n```\n\n5. Verify your aws credentials are good to go:\n```\naws configure list\n```\n\n6. Deploy the function to the \"dev\" stage\n```\nserverless deploy --stage dev\n```\n\n7. Deploy the function to the \"prod\" stage\n```\nserverless deploy --stage prod\n```\n\n8. Run in \"offine\" local mode (functions exec locally, but writes to s3 are real)\n```\nserverless offline\n```\n\n## Notes\n\nOnce up and running you can checkout the created items in the follow AWS services. Be sure to verify that your region matches the region in your local AWS creds file which in-turn is the region where serverless will deploy everything to.\n\n* https://console.aws.amazon.com/events (click on events -\u003e rules)\n  * There will be 2 `covid19datapuller-[dev|prod]` event triggers created for both the dev/prod functions (every 60m, you can change this in `serverless.yaml`)\n  \n* https://s3.console.aws.amazon.com/s3/home\n  * There will be 2 `covid19datapuller-[dev|prod]` buckets created, one for each dev/prod function, where the pulled data will be written in JSON format and annotated w/ the function version and timestamp the data was pulled. (every 60m)\n  \n* https://console.aws.amazon.com/lambda\n  * There should be 2 `covid19datapuller-[dev|prod]` functions, one for each serverless \"stage\" (dev/prod)\n\n* https://console.aws.amazon.com/cloudformation/home\n    * There should be 2 `covid19datapuller-[dev|prod]` stacks, one for each dev/prod serverless app\n  \n* https://console.aws.amazon.com/iam/home (look in roles)\n  * There should be 2 `covid19datapuller-[dev|prod]` roles with appropriate permissions\n\n## Erratta\n\n`serverless deploy --stage [env]` could be invoked via a simple CICD process which also would seed the `current-version.yaml` file with the current git tag/branch identifier which would subsequently tag the function versions + data written to disk.\n\nLambda aliases: https://www.serverless.com/plugins/serverless-aws-alias/ \n\n## Cleanup\n\n\nManual cleanup of buckets should be done first.\n\nAfter than you can run:\n```\nserverless remove -s dev\nserverless remove -s prod\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsofinfo%2Fcovid19datapuller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitsofinfo%2Fcovid19datapuller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitsofinfo%2Fcovid19datapuller/lists"}