{"id":15345264,"url":"https://github.com/hazems/aws-lambda-python-covid19-news","last_synced_at":"2026-02-07T04:02:31.473Z","repository":{"id":79162930,"uuid":"247882693","full_name":"hazems/aws-lambda-python-covid19-news","owner":"hazems","description":"This is a sample AWS Python3 COVID-19 Headline News API.","archived":false,"fork":false,"pushed_at":"2020-03-26T03:24:00.000Z","size":2151,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T18:53:19.945Z","etag":null,"topics":["aws","aws-lambda","python3","rest"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/hazems.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":"2020-03-17T04:56:12.000Z","updated_at":"2021-01-18T06:10:44.000Z","dependencies_parsed_at":"2023-06-29T21:16:24.026Z","dependency_job_id":null,"html_url":"https://github.com/hazems/aws-lambda-python-covid19-news","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hazems/aws-lambda-python-covid19-news","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazems%2Faws-lambda-python-covid19-news","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazems%2Faws-lambda-python-covid19-news/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazems%2Faws-lambda-python-covid19-news/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazems%2Faws-lambda-python-covid19-news/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hazems","download_url":"https://codeload.github.com/hazems/aws-lambda-python-covid19-news/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hazems%2Faws-lambda-python-covid19-news/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266332597,"owners_count":23912663,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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","python3","rest"],"created_at":"2024-10-01T11:11:28.256Z","updated_at":"2026-02-07T04:02:31.431Z","avatar_url":"https://github.com/hazems.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Lambda COVID-19 Headline News API\n\nThis is a sample AWS Python3 COVID-19 Headline News API. The following diagram illustrates the design, as shown below, you can create an HTML file inside an S3 bucket, and in this HTML file, you can send an XHR request to the Lambda function and then you can render the news as you wish:\n![Architecture Diagram](figures/architecture.png)\n\n## How to run this sample?\n\nTo be able to run this sample, you need to get an API key from https://newsapi.org/\n\n## Client Sample\nYou can use this code as a client sample that calls Lambda service.\n\n```\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003cscript type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"\u003e\u003c/script\u003e\n        \u003clink rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\"\u003e\n        \u003cscript\u003e\n            $(document).ready(function() {\n                $.get(\"[Here Place your API Endpoint URL]\", function(data) {\n                  var content = \"\";                  \n                  for (var i = 0; i \u003c data.length; ++i) {\n                      content += createCard(data[i].author, data[i].title, data[i].description, data[i].imageUrl, data[i].newsUrl);\n                  }\n                  \n                  $(\"#result\").html(content);\n                });\n            });\n            \n            function createCard(author, title, description, imageUrl, newsUrl) {\n                if (description == null) {\n                    description = \"To be provided soon\";\n                }\n                \n                return \"\u003cdiv class=\\\"card\\\"\u003e\" + \n                            \"\u003cdiv class=\\\"card-header\\\"\u003e\" +\n                           \"By \" + author + \n                            \"\u003c/div\u003e\" +\n                          \"\u003cdiv class=\\\"card-body\\\"\u003e\" +\n                          \"\u003ch5 class=\\\"card-title\\\"\u003e\" + title + \"\u003c/h5\u003e\" +\n                          \"\u003cp class=\\\"card-text\\\"\u003e\" + description + \"\u003c/p\u003e\" +\n                          \"\u003cp\u003e\u003cimg src=\\\"\" + imageUrl + \"\\\" height='300px' width='500px' alt=\\\"...\\\"\u003e\u003c/p\u003e\" +\n                          \"\u003ca target=\\\"_blank\\\" href=\\\"\" + newsUrl + \"\\\" class=\\\"btn btn-primary\\\"\u003eGo to News Source\u003c/a\u003e\" + \n                            \"\u003c/div\u003e\"+\n                        \"\u003c/div\u003e\u003cbr/\u003e\";\n            }\n        \u003c/script\u003e\n        \u003cstyle\u003e\n            body {\n              padding: 10px;\n            }\n            h1 {\n              padding-bottom: 5px;\n            }\n            .jumbotron {\n              color: white;\n              background-image: url(\"covid19.jpg\");\n              background-position: center;\n              background-repeat: no-repeat;\n              background-size: cover;\n            }            \n        \u003c/style\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003cdiv class=\"jumbotron jumbotron-fluid\"\u003e\n          \u003cdiv class=\"container\"\u003e\n            \u003ch1 class=\"display-4\"\u003eCOVID-19 Breakout!\u003c/h1\u003e\n            \u003cp\u003eGet the latest news about this virus from different News sources\u003c/p\u003e\n          \u003c/div\u003e\n        \u003c/div\u003e    \n        \u003cdiv id=\"result\"\u003e\n        \u003c/div\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Output\nThe client output will be rendered as shown below.\n![Output](figures/output.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazems%2Faws-lambda-python-covid19-news","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhazems%2Faws-lambda-python-covid19-news","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhazems%2Faws-lambda-python-covid19-news/lists"}