|
2 | 2 |
|
3 | 3 | [](https://github.com/mergermarket/terraform-acuris-aws-lambda/actions/workflows/test.yml) |
4 | 4 |
|
5 | | -This module will deploy a Lambda function. |
| 5 | +This module will deploy a Lambda function. It supports both Zip and Image deployments. |
6 | 6 |
|
7 | | -## Module Input Variables |
| 7 | +> NOTE 1: if image_uri is set then ECR Image will be deployed regardless of what Zip deployment properties are set to. |
| 8 | +
|
| 9 | +> NOTE 2: if both security_group_ids and subnet_ids are empty then the Lambda will not have access to resources within a VPC. |
| 10 | +
|
| 11 | +## Module input variables (shared) |
8 | 12 |
|
9 | 13 | - `function_name` - (string) - **REQUIRED** - The name of the Lambda function. |
10 | | -- `handler` - (map) - **REQUIRED (Zip deployment)** - The function within your code that Lambda calls to begin execution. |
11 | 14 | - `lambda_env` - (map) - Environment parameters passed to the Lambda function. |
12 | 15 | - `lambda_role_policy` (string) - The Lambda IAM Role Policy. |
13 | 16 | - `log_subscription_filter` - (string) - Subscription filter to filter logs sent to datadog. |
14 | 17 | - `memory_size` (number) - Amount of memory in MB your Lambda Function can use at runtime. |
15 | | -- `runtime` - (string) - **REQUIRED (Zip deployment)** - The runtime environment for the Lambda function you are uploading. |
16 | | -- `s3_bucket` - (string) - **REQUIRED (Zip deployment)** - The name of the bucket containing your uploaded Lambda deployment package. |
17 | | -- `s3_key` - (string) - **REQUIRED (Zip deployment)** - The s3 key for your Lambda deployment package. |
18 | | -- `image_uri` - (string) - **REQUIRED (Image deployment)** - Uri to the image in ECR repo. |
19 | | -- `image_config_command` - (list) - Used only if Image deployment. List of values with which to override CMD entry in the image. |
20 | | -- `image_config_entry_point` - (list) - Used only if Image deployment. List of values with which to override ENTRYPOINT entry in the image. |
21 | | -- `image_config_working_directory` - (string) - Used only if Image deployment. Value with which to override WORKDIR entry in the image. |
22 | 18 | - `security_group_ids` - (list) - The VPC security groups assigned to the Lambda. |
23 | 19 | - `subnet_ids` - (list) - The VPC subnets in which the Lambda runs. |
24 | 20 | - `timeout` (number) - The maximum time in seconds that the Lambda can run for. |
25 | 21 | - `reserved_concurrent_executions` (number) - The amount of reserved concurrent executions for this lambda function. |
26 | 22 | - `tags` (map) - A mapping of tags to assign to this lambda function. |
27 | 23 | - `datadog_log_subscription_arn` - (string) - Log subscription arn for shipping logs to datadog. |
28 | | -- `layers` - (list) - Used only if Zip deployment. ARNs of the layers to attach to the lambda function in order. |
29 | 24 |
|
30 | | -> NOTE 1: if both security_group_ids and subnet_ids are empty then the Lambda will not have access to resources within a VPC. |
| 25 | +### Zip deployment variables |
| 26 | +- `runtime` - (string) - **REQUIRED** - The runtime environment for the Lambda function you are uploading. |
| 27 | +- `handler` - (map) - **REQUIRED** - The function within your code that Lambda calls to begin execution. |
| 28 | +- `s3_bucket` - (string) - **REQUIRED** - The name of the bucket containing your uploaded Lambda deployment package. |
| 29 | +- `s3_key` - (string) - **REQUIRED** - The s3 key for your Lambda deployment package. |
| 30 | +- `layers` - (list) - ARNs of the layers to attach to the lambda function in order. |
| 31 | + |
| 32 | +### Image deployment variables |
| 33 | +- `image_uri` - (string) - **REQUIRED** - Uri to the image in ECR repo. |
| 34 | +- `image_config_command` - (list) - List of values with which to override CMD entry in the image. |
| 35 | +- `image_config_entry_point` - (list) - List of values with which to override ENTRYPOINT entry in the image. |
| 36 | +- `image_config_working_directory` - (string) - Value with which to override WORKDIR entry in the image. |
31 | 37 |
|
32 | | -> NOTE 2: if image_uri is set then ECR Image will be deployed regardless of what Zip deployment properties are set to. |
33 | 38 |
|
34 | 39 | ## Usage |
35 | 40 |
|
|
0 commit comments