{"id":14065968,"url":"https://github.com/discindo/r2lambda","last_synced_at":"2026-02-19T02:40:37.891Z","repository":{"id":149448775,"uuid":"595226138","full_name":"discindo/r2lambda","owner":"discindo","description":"Deploy an R script as AWS lambda from the R console","archived":false,"fork":false,"pushed_at":"2025-01-16T15:53:48.000Z","size":1881,"stargazers_count":33,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-29T22:30:10.934Z","etag":null,"topics":["aws","aws-lambda","r"],"latest_commit_sha":null,"homepage":"https://discindo.github.io/r2lambda/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/discindo.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"discindo","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2023-01-30T16:50:35.000Z","updated_at":"2025-01-16T15:50:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab7fefa8-1d5a-452c-8e7b-10a92f9bf121","html_url":"https://github.com/discindo/r2lambda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/discindo/r2lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discindo%2Fr2lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discindo%2Fr2lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discindo%2Fr2lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discindo%2Fr2lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discindo","download_url":"https://codeload.github.com/discindo/r2lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discindo%2Fr2lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29601174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T02:40:14.655Z","status":"ssl_error","status_checked_at":"2026-02-19T02:39:30.954Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","r"],"created_at":"2024-08-13T07:04:52.663Z","updated_at":"2026-02-19T02:40:37.871Z","avatar_url":"https://github.com/discindo.png","language":"R","funding_links":["https://ko-fi.com/discindo"],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# r2lambda\n\n\u003c!-- badges: start --\u003e\n\n[![R-CMD-check](https://github.com/discindo/r2lambda/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/discindo/r2lambda/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/discindo/r2lambda/branch/main/graph/badge.svg)](https://app.codecov.io/gh/discindo/r2lambda?branch=main)\n\u003c!-- badges: end --\u003e\n\nThe goal of `{r2lambda}` is to make it easier to go from an `R` script to a deployed \n`AWS Lambda` function.\n\n## Requirements\n\n- [docker](https://docs.docker.com/get-docker/) is required to build, tag, and push the image.\n\n## Installation\n\nYou can install the development version of `{r2lambda}` like so:\n\n``` r\n# install_packages(\"remotes\")\nremotes::install_github(\"discindo/r2lambda\")\n```\n\n## Setup\n\n`r2lambda` assumes credentials for connecting to AWS services are available\nin the `R` session. This can be done via an `.Renviron` file that should set \nenironmental variables like so:\n\n```\nAWS_ACCESS_KEY_ID = \"YOUR AWS ACCESS KEY ID\"\nAWS_SECRET_ACCESS_KEY = \"YOUR AWS SECRET ACCESS KEY\"\nAWS_PROFILE = \"YOUR AWS PROFILE\"\nAWS_REGION = \"YOUR AWS REGION\"\n```\n\nBut since `r2lambda` uses `paws` under the hood, all authentication methods\nsupported by `paws` are available in `r2lambda`. See \n[here](https://github.com/paws-r/paws/blob/main/docs/credentials.md) for details\non setting credentials, region, profile, etc.\n\n## Workflow\n\n### Build a docker image for the lambda function\n\n```{r, eval = FALSE}\nruntime_function \u003c- \"parity\"\nruntime_path \u003c- system.file(\"parity.R\", package = \"r2lambda\")\nrenvlock_path \u003c- system.file(\"renv.lock\", package = \"r2lambda\")\ndependencies \u003c- NULL\n\n# Might take a while, its building a docker image\nbuild_lambda(\n  tag = \"parity1\",\n  runtime_function = runtime_function,\n  runtime_path = runtime_path,\n  renvlock_path = renvlock_path,\n  dependencies = dependencies\n)\n```\n\n### Test the lambda docker image locally\n\n```{r, eval = FALSE}\npayload \u003c- list(number = 2)\ntag \u003c- \"parity1\"\ntest_lambda(tag = \"parity1\", payload)\n```\n\n### Deploy to AWS Lambda\n\n```{r, eval = FALSE}\n# Might take a while, its pushing it to a remote repository\ndeploy_lambda(tag = \"parity1\")\n```\n\n### Invoke deployed lambda\n\n```{r, eval = FALSE}\ninvoke_lambda(\n  function_name = \"parity1\",\n  invocation_type = \"RequestResponse\",\n  payload = list(number = 2),\n  include_logs = FALSE\n)\n\n#\u003e Lambda response payload:\n#\u003e {\"parity\":\"even\"}\n```\n\n## Code of Conduct\n\nPlease note that the r2lambda project is released with a \n[Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By \ncontributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscindo%2Fr2lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscindo%2Fr2lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscindo%2Fr2lambda/lists"}