{"id":18657959,"url":"https://github.com/lightsofapollo/aws-lambda-ideas","last_synced_at":"2026-01-25T12:01:15.746Z","repository":{"id":27791578,"uuid":"31280497","full_name":"lightsofapollo/aws-lambda-ideas","owner":"lightsofapollo","description":"Some ideas around usage with aws lambda","archived":false,"fork":false,"pushed_at":"2015-02-24T21:03:22.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-18T01:07:08.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/lightsofapollo.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}},"created_at":"2015-02-24T20:32:58.000Z","updated_at":"2015-02-24T20:32:58.000Z","dependencies_parsed_at":"2022-09-11T11:21:03.556Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/aws-lambda-ideas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lightsofapollo/aws-lambda-ideas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Faws-lambda-ideas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Faws-lambda-ideas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Faws-lambda-ideas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Faws-lambda-ideas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/aws-lambda-ideas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Faws-lambda-ideas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"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":[],"created_at":"2024-11-07T07:30:48.866Z","updated_at":"2026-01-25T12:01:15.719Z","avatar_url":"https://github.com/lightsofapollo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Lambda + Github + Taskcluster:\n\nAWS Lambda offers very attractive pricing and a ec2 secured environment that is fast/reliable/secure it has a few key downsides though:\n\n - Tasks must be limited to 60s or less\n - Your node version is restricted (note: you can also compile and ship a go or rust binary here)\n - No automated mechanisms for updating or deploying functions.\n\nThis describes how we could extend these apis to build a much more ideal task runner system which would be suited for very\nshort tasks which either post data back to aws or create taskcluster graphs/tasks.\n\n\n## Lambda VS Taskcluster:\n\n  - Taskcluster will generally be more or as expensive.\n\n  - For cases where we want to use the security model of AWS instead of\n    our own.\n\n  - Very very small tasks which taskcluster overhead is near the cost of\n    running the task.\n\n  - For \"administrative\" or \"scheduling\" tasks which have very low\n    compute requirements and/or low network requirements.\n\n## Namespaces and Packaging\n\nA big issue with the lambda functions is they are limited by the [length of their names](http://docs.aws.amazon.com/lambda/latest/dg/API_FunctionConfiguration.html) using a model similar to how go implements their package namespace we can workaround this with a package scheme like this:\n\n```\n\u003crelative resource url\u003e/\u003cpath\u003e/\u003cpackage\u003e\n```\n\nFor example:\n\n```\ngithub.com/lightsofapollo/my-functions/do-things/\n```\n\nFrom here it is an easy thing to hash the name and you have a easy way\nto package the functions.\n\n### Package details\n\nIndividual functions can specify their \"handler\" this means you can\noften group related actions into a single \"function\" then reference the\nexport of that function. (For example you could specify the handler of\nmain.\u003cexport\u003e).\n\n - do-things/\n - do-things/package.json\n - do-things/main.js\n\n#### Bundling of packages\n\nThe abstract of the packaging details:\n\n - cd \u003cpackage\u003e\n - npm install --production\n - \u003czip the contents of package\u003e\n\n\n### Sync\n\nA key missing feature is the ability to sync a vcs controlled repository\n(something on github/etc...) to lambda functions. This is easily done\nnow that we have a naming scheme and understand how to package\nfunctions.\n\nTaskcluster (or even lambda if your packages are small) can easily then\ngenerate the lambda functions with the following algorithm:\n\n  - Iterate through each package: derive name of function from hash of repository name + path\n     1. Call get function\n        a. Function does not exist go to 2.\n        b. Function exists and description contains current revision of directory continue to next package.\n        \n     2. Bundle package. Initiate upload of package with hash as function\n        name and the description as follows: `\u003crepository path\u003e@\u003crevision\u003e`\n\n     3. Continue to next package.\n\nThe above could be run as multiple tasks/functions (one checking for\nupdates another running updates).\n\nIn a pure lambda pipeline something like this could be done:\n\n  - Checkout vcs at revision X, upload to s3\n  - Checkout vcs from s3 look for changes in each package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Faws-lambda-ideas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Faws-lambda-ideas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Faws-lambda-ideas/lists"}