{"id":20195004,"url":"https://github.com/mich0232/aws-lambda","last_synced_at":"2026-05-11T11:32:48.148Z","repository":{"id":154750511,"uuid":"571259569","full_name":"Mich0232/aws-lambda","owner":"Mich0232","description":"AWS Lambda module creates a function with required IAM Roles and permissions. You can enable CW logs and X-Ray integration","archived":false,"fork":false,"pushed_at":"2023-01-20T17:51:34.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T19:21:46.021Z","etag":null,"topics":["aws","aws-lambda","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","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/Mich0232.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":"2022-11-27T17:07:13.000Z","updated_at":"2022-11-30T01:02:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"17672775-7b63-4072-bf6c-e7c788960d67","html_url":"https://github.com/Mich0232/aws-lambda","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/Mich0232%2Faws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mich0232%2Faws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mich0232%2Faws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mich0232%2Faws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mich0232","download_url":"https://codeload.github.com/Mich0232/aws-lambda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241629773,"owners_count":19993710,"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":["aws","aws-lambda","terraform","terraform-module"],"created_at":"2024-11-14T04:15:19.189Z","updated_at":"2026-05-11T11:32:48.118Z","avatar_url":"https://github.com/Mich0232.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## AWS Lambda module\n\nThis module creates a simple AWS function.\nFunction can be integrated with AWS Package module to create an on-change triggered function deployment. \n\nNote: Function will be granted access to the deployment bucket provided in the configuration.\n\n### Provisioned Resources:\n\n - AWS Lambda\n - IAM Role with CloudWatch \u0026 S3 deployment bucket access policy\n\n### Input Variables:\n\n`project_name` - Name of the project (Project name will be included as a prefix in resources)\n\n`function_name` - Lambda function name (Note: final lambda name will consist of project + lambda names)\n\n`policies` - list or IAM policy arns that will be attached to lambda's IAM Role.\n\n`layers` - list of AWS Layer's arns to attached to function.\n\n`enable_cloudwatch_logs` - If true 'AWSLambdaBasicExecutionRole' will be attached. (default: true)\n\n`enable_x_ray_tracing` - If true 'AWSXRayDaemonWriteAccess' will be attached. (default: false)\n\n`deployment_bucket_arn` - ARN of S3 bucket containing the AWS lambda deployment package.\n\n`deployment_bucket_name` - Name of S3 bucket containing the AWS lambda deployment package.\n\n`deployment_package_key` - Key of S3 bucket object with the AWS lambda deployment package.\n\n### Lambda settings\n\n[AWS Lambda Documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html) \n\n- `timeout` - 60s\n- `memory` - 128mb\n- `runtime` - python3.9\n- `handler` - main.handler\n- `architectures` - x86_64\n\n`tags` - map of lambda tags (Up to 8 can be specified since, Name and Project will be added by default)\n\n\n### Outputs\n\n`function_name` - Function name\n\n`arn` - ARN of created function\n\n`invoke_arn` - Invoke ARN of created function\n\n`version` - Latest published version of created function\n\n\n### Example\n\n```terraform\nmodule \"lambda\" {\n  source = \"github.com/Mich0232/aws-lambda.git\"\n\n  project_name  = \"example-project\"\n  function_name = \"my-service\"\n\n  deployment_bucket_arn  = aws_s3_bucket.deployment_bucket.arn\n  deployment_bucket_name = aws_s3_bucket.deployment_bucket.bucket\n  deployment_package_key = \"my-service/build.zip\"\n  source_code_hash       = \"83bc6426i7b73ci\"\n}\n```\n\nUsing [aws-package module](https://github.com/Mich0232/aws-package):\n\n\n```terraform\nmodule \"code\" {\n  source = \"github.com/Mich0232/aws-package.git\"\n\n  deployment_bucket_id     = aws_s3_bucket.deployment_bucket.id\n  deployment_bucket_prefix = \"example\"\n  source_dir               = \"../src\"\n  output_dir               = \"../output/code\"\n\n  hash_sources   = [ \"*.py\" ]\n  excluded_paths = [ \"__pycache__\" ]\n}\n\n\nmodule \"lambda\" {\n  source = \"github.com/Mich0232/aws-lambda.git\"\n\n  project_name  = \"example-project\"\n  function_name = \"my-service\"\n\n  deployment_bucket_arn  = aws_s3_bucket.deployment_bucket.arn\n  deployment_bucket_name = aws_s3_bucket.deployment_bucket.bucket\n  deployment_package_key = module.code.key\n  source_code_hash       = module.code.output_base64sha256\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmich0232%2Faws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmich0232%2Faws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmich0232%2Faws-lambda/lists"}