{"id":20811293,"url":"https://github.com/express42/terraform-aws-lambda-python","last_synced_at":"2025-12-25T23:29:56.954Z","repository":{"id":66323630,"uuid":"115607010","full_name":"express42/terraform-aws-lambda-python","owner":"express42","description":null,"archived":false,"fork":false,"pushed_at":"2019-08-10T09:25:30.000Z","size":26,"stargazers_count":25,"open_issues_count":0,"forks_count":21,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-01-18T14:46:37.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/express42.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":"2017-12-28T09:22:57.000Z","updated_at":"2024-11-21T11:01:05.000Z","dependencies_parsed_at":"2023-02-25T08:15:09.162Z","dependency_job_id":null,"html_url":"https://github.com/express42/terraform-aws-lambda-python","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/express42%2Fterraform-aws-lambda-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/express42%2Fterraform-aws-lambda-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/express42%2Fterraform-aws-lambda-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/express42%2Fterraform-aws-lambda-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/express42","download_url":"https://codeload.github.com/express42/terraform-aws-lambda-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158972,"owners_count":20245669,"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-11-17T20:39:54.762Z","updated_at":"2025-12-25T23:29:56.881Z","avatar_url":"https://github.com/express42.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform module for AWS Lambda Python function deployment\n\nTerraform module which prepares and deploys python lambda function and prepares all necessities for it in AWS infrastructure.\n\n## Features \n* Downloads python dependencies from requirements.txt to `lambda/lib` directory\n* Archives lambda function with all dependencies into `lambda.zip`\n* Creates IAM policy, lambda function, API Gateway and CloudWatch log group\n* Creates IAM policy with additional rules\n* Deploy lambda function\n* Possible to use with python virtualenv\n\n## Usage\n\n### Preparation\n* Put logic into `lambda_handler` in `lambda/main.py`\n* Put your Lambda function requirements into `requirements.txt`\n\n### Configuration example\n```hcl\nmodule \"lambda_python\" {\n  source            = \"express42/lambda-python/aws\"\n\n  aws_profile       = \"default\"\n  aws_region        = \"eu-west-1\"\n\n  pip_path          = \"/usr/bin/pip\"\n\n  lambda_name       = \"lambda_example\"\n  lambda_api_name   = \"lambda_example_api\"\n  lambda_iam_name   = \"lambda_example_iam\"\n\n  api_stage_name    = \"dev\"\n  api_resource_path = \"example\"\n  api_http_method   = \"POST\"\n  \n  iam_additional_policy = \u003c\u003cPOLICY\n  {\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n      {\n        \"Effect\": \"Allow\",\n        \"Action\": [\n          \"dynamodb:BatchGetItem\",\n          \"dynamodb:GetItem\",\n          \"dynamodb:Query\",\n          \"dynamodb:Scan\",\n          \"dynamodb:BatchWriteItem\",\n          \"dynamodb:PutItem\",\n          \"dynamodb:UpdateItem\"\n        ],\n        \"Resource\": \"arn:aws:dynamodb:*\"\n      }\n    ]\n  }\n  POLICY\n}\n\noutput \"lambda_url\" {\n  value = \"${module.lambda_python.url}\"\n}\n```\n\n## Examples\n* [Basic Example](https://github.com/express42/terraform-aws-lambda-python/tree/master/examples/basic) shows the simplest way to use this module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpress42%2Fterraform-aws-lambda-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpress42%2Fterraform-aws-lambda-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpress42%2Fterraform-aws-lambda-python/lists"}