{"id":13572224,"url":"https://github.com/rackerlabs/lambda-uploader","last_synced_at":"2025-04-13T00:27:51.353Z","repository":{"id":1779388,"uuid":"44770397","full_name":"rackerlabs/lambda-uploader","owner":"rackerlabs","description":"Helps package and upload Python lambda functions to AWS","archived":false,"fork":false,"pushed_at":"2023-05-09T21:05:20.000Z","size":176,"stargazers_count":271,"open_issues_count":32,"forks_count":57,"subscribers_count":96,"default_branch":"master","last_synced_at":"2025-04-04T09:36:42.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rackerlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2015-10-22T20:08:58.000Z","updated_at":"2024-12-26T16:03:41.000Z","dependencies_parsed_at":"2023-07-12T09:01:28.075Z","dependency_job_id":null,"html_url":"https://github.com/rackerlabs/lambda-uploader","commit_stats":{"total_commits":138,"total_committers":28,"mean_commits":4.928571428571429,"dds":0.427536231884058,"last_synced_commit":"afabab19bc9c2431c5b838b80d10e82f262668ea"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rackerlabs%2Flambda-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rackerlabs%2Flambda-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rackerlabs%2Flambda-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rackerlabs%2Flambda-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rackerlabs","download_url":"https://codeload.github.com/rackerlabs/lambda-uploader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650840,"owners_count":21139670,"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","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-08-01T14:01:16.966Z","updated_at":"2025-04-13T00:27:51.326Z","avatar_url":"https://github.com/rackerlabs.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# lambda-uploader\n\nProvides a quick command line utility for packaging and publishing Python AWS Lambda\nfunctions.  This is a work in progress and pull requests are always welcome.\n\n### Installation\nThe latest release of lambda-uploader can be installed via pip:\n```\npip install lambda-uploader\n```\nAn alternative install method would be manually installing it leveraging `setup.py`:\n```\ngit clone https://github.com/rackerlabs/lambda-uploader\ncd lambda-uploader\npython setup.py install\n```\n\n### Configuration File\nThe lambda uploader expects a directory with, at a minimum, your lambda function\nand a `lambda.json` file.  It is not necessary to set requirements in your config\nfile since the lambda uploader will also check for and use a requirements.txt file.\n\nPlease note that you can leave the `vpc` object out of your config if you want your\nlambda function to use your default VPC and subnets. If you wish to use your lambda\nfunction inside a specific VPC, make sure you set up the role correctly to allow this.\n\nNote also the `ignore` entry is an array of regular expression strings\nused to match against the relative paths - be careful to quote accordingly.\nFor example, a traditional `*.txt` \"glob\" is matched by the JSON string:\n`\".*\\\\.txt$\"` (or just `\"\\\\.txt$\"`).\n\nExample `lambda.json` file:\n```json\n{\n  \"name\": \"myFunction\",\n  \"description\": \"It does things\",\n  \"region\": \"us-east-1\",\n  \"runtime\": \"python2.7\",\n  \"handler\": \"function.lambda_handler\",\n  \"role\": \"arn:aws:iam::00000000000:role/lambda_basic_execution\",\n  \"requirements\": [\"pygithub\"],\n  \"ignore\": [\n    \"circle\\\\.yml$\",\n    \"\\\\.git$\",\n    \"/.*\\\\.pyc$\"\n  ],\n  \"timeout\": 30,\n  \"memory\": 512,\n  \"vpc\": {\n    \"subnets\": [\n      \"subnet-00000000\"\n    ],\n    \"security_groups\": [\n      \"sg-00000000\"\n    ]\n  },\n  \"tracing\": {\n    \"Mode\": \"Active\"\n  }\n}\n```\n\nYou can also optionally setup a subscription to a Kinesis stream for your\nlambda using the `subscription` field as in the following sample configuration.\n\n```json\n{\n  \"name\": \"myFunction\",\n  \"description\": \"It does things\",\n  \"region\": \"us-east-1\",\n  \"runtime\": \"python2.7\",\n  \"handler\": \"function.lambda_handler\",\n  \"role\": \"arn:aws:iam::00000000000:role/lambda_basic_execution\",\n  \"requirements\": [\"pygithub\"],\n  \"timeout\": 30,\n  \"memory\": 512,\n  \"subscription\": {\n    \"kinesis\": {\n      \"stream\": \"arn:aws:kinesis:eu-west-1:000000000000:stream/services\",\n      \"batch_size\": 10\n    }\n  }\n}\n```\n\n\n### Command Line Usage\nTo package and upload simply run the command from within your lambda directory or\nwith the directory as an option.\n```shell\nlambda-uploader ./myfunc\n```\n\nTo specify an alternative profile that has been defined in `~/.aws/credentials` use the\n`--profile` parameter.\n```shell\nlambda-uploader --profile=alternative-profile\n```\n\nTo specify an alternative, prexisting virtualenv use the `--virtualenv` parameter.\n```shell\nlambda-uploader --virtualenv=~/.virtualenv/my_custom_virtualenv\n```\n\nTo omit using a virtualenv use the `--no-virtualenv` parameter.\n```shell\nlambda-uploader --no-virtualenv\n```\n\nTo inject any other additional files, use the `--extra-file EXTRA_FILE` parameter.\n```shell\nlambda-uploader --extra-file ~/stuff_for_lambda_packages\n```\n\nIf you would prefer to upload another way you can tell the uploader to ignore the upload.\nThis will create a package and leave it in the project directory.\n```shell\nlambda-uploader --no-upload ./myfunc\n```\n\nTo publish a version without an alias you would pass the the publish flag.\n```shell\nlambda-uploader -p ./myfunc\n```\n\nIf you would like to alias your upload you can pass the alias with the alias flag. The\nfunction description will be used when an alias-description is not provided.\n```shell\nlambda-uploader --alias myAlias --alias-description 'My alias description' ./myfunc\n```\n\nIf you would prefer to build the package manually and just upload it using uploader you can ignore the build.\nThis will upload `lambda_function.zip` file.\n```shell\nlambda-uploader --no-build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frackerlabs%2Flambda-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frackerlabs%2Flambda-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frackerlabs%2Flambda-uploader/lists"}