You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-20Lines changed: 39 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,13 @@ should migrate to this module as a drop-in replacement for all provisions up to
27
27
28
28
The module can be used for all [runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) supported by AWS Lambda.
29
29
30
-
Deployment packages can be specified either directly as a local file (using the `filename` argument) or indirectly via Amazon S3 (using the `s3_bucket`, `s3_key` and `s3_object_versions` arguments), see [documentation](https://www.terraform.io/docs/providers/aws/r/lambda_function.html#specifying-the-deployment-package) for details.
30
+
Deployment packages can be specified either directly as a local file (using the `filename` argument), indirectly via Amazon S3 (using the `s3_bucket`, `s3_key` and `s3_object_versions` arguments)
31
+
or using [container images](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html) (using `image_uri` and `package_type` arguments),
32
+
see [documentation](https://www.terraform.io/docs/providers/aws/r/lambda_function.html#specifying-the-deployment-package) for details.
@@ -127,12 +142,13 @@ MINOR, and PATCH versions on each release to indicate any incompatibilities.
127
142
| Name | Version |
128
143
|------|---------|
129
144
| terraform | >= 0.12.0 |
145
+
| aws | >= 3.19 |
130
146
131
147
## Providers
132
148
133
149
| Name | Version |
134
150
|------|---------|
135
-
| aws |n/a|
151
+
| aws |>= 3.19|
136
152
137
153
## Inputs
138
154
@@ -141,25 +157,28 @@ MINOR, and PATCH versions on each release to indicate any incompatibilities.
141
157
| description | Description of what your Lambda Function does. |`string`|`""`| no |
142
158
| environment | Environment (e.g. env variables) configuration for the Lambda function enable you to dynamically pass settings to your function code and libraries | <pre>object({<br> variables = map(string)<br> })</pre> |`null`| no |
143
159
| event | Event source configuration which triggers the Lambda function. Supported events: cloudwatch-scheduled-event, dynamodb, s3, sns |`map(string)`|`{}`| no |
144
-
| filename | The path to the function's deployment package within the local filesystem. If defined, The s3\_-prefixed options cannot be used. |`string`|`""`| no |
160
+
| filename | The path to the function's deployment package within the local filesystem. If defined, The s3\_-prefixed options and image\_uri cannot be used. |`string`|`null`| no |
145
161
| function\_name | A unique name for your Lambda Function. |`any`| n/a | yes |
146
-
| handler | The function entrypoint in your code. |`any`| n/a | yes |
162
+
| handler | The function entrypoint in your code. |`string`|`""`| no |
163
+
| image\_config | The Lambda OCI [image configurations](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function#image_config) block with three (optional) arguments:<br><br> - *entry\_point* - The ENTRYPOINT for the docker image (type `list(string)`).<br> - *command* - The CMD for the docker image (type `list(string)`).<br> - *working\_directory* - The working directory for the docker image (type `string`). |`any`|`{}`| no |
164
+
| image\_uri | The ECR image URI containing the function's deployment package. Conflicts with filename, s3\_bucket, s3\_key, and s3\_object\_version. |`string`|`null`| no |
147
165
| kms\_key\_arn | Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is used to encrypt environment variables. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. If this configuration is provided when environment variables are not in use, the AWS Lambda API does not save this configuration and Terraform will show a perpetual difference of adding the key. To fix the perpetual difference, remove this configuration. |`string`|`""`| no |
148
166
| layers | List of Lambda Layer Version ARNs (maximum of 5) to attach to your Lambda Function. |`list(string)`|`[]`| no |
149
-
| log\_retention\_in\_days | Specifies the number of days you want to retain log events in the specified log group. Defaults to 14. |`number`|`14`| no |
167
+
| log\_retention\_in\_days | Specifies the number of days you want to retain log events in the specified log group. |`number`|`14`| no |
150
168
| logfilter\_destination\_arn | The ARN of the destination to deliver matching log events to. Kinesis stream or Lambda function ARN. |`string`|`""`| no |
151
-
| memory\_size | Amount of memory in MB your Lambda Function can use at runtime. Defaults to 128. |`number`|`128`| no |
152
-
| publish | Whether to publish creation/change as new Lambda Function Version. Defaults to false. |`bool`|`false`| no |
153
-
| reserved\_concurrent\_executions | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. Defaults to Unreserved Concurrency Limits -1. |`string`|`"-1"`| no |
154
-
| runtime | The runtime environment for the Lambda function you are uploading. |`any`| n/a | yes |
155
-
| s3\_bucket | The S3 bucket location containing the function's deployment package. Conflicts with filename. This bucket must reside in the same AWS region where you are creating the Lambda function. |`string`|`""`| no |
156
-
| s3\_key | The S3 key of an object containing the function's deployment package. Conflicts with filename. |`string`|`""`| no |
157
-
| s3\_object\_version | The object version containing the function's deployment package. Conflicts with filename. |`string`|`""`| no |
169
+
| memory\_size | Amount of memory in MB your Lambda Function can use at runtime. |`number`|`128`| no |
170
+
| package\_type | The Lambda deployment package type. Valid values are Zip and Image. |`string`|`"Zip"`| no |
171
+
| publish | Whether to publish creation/change as new Lambda Function Version. |`bool`|`false`| no |
172
+
| reserved\_concurrent\_executions | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. |`string`|`"-1"`| no |
173
+
| runtime | The runtime environment for the Lambda function you are uploading. |`string`|`""`| no |
174
+
| s3\_bucket | The S3 bucket location containing the function's deployment package. Conflicts with filename and image\_uri. This bucket must reside in the same AWS region where you are creating the Lambda function. |`string`|`null`| no |
175
+
| s3\_key | The S3 key of an object containing the function's deployment package. Conflicts with filename and image\_uri. |`string`|`null`| no |
176
+
| s3\_object\_version | The object version containing the function's deployment package. Conflicts with filename and image\_uri. |`string`|`null`| no |
158
177
| source\_code\_hash | Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file specified with either filename or s3\_key. The usual way to set this is filebase64sha256('file.zip') where 'file.zip' is the local filename of the lambda function source archive. |`string`|`""`| no |
159
178
| ssm | List of AWS Systems Manager Parameter Store parameter names. The IAM role of this Lambda function will be enhanced with read permissions for those parameters. Parameters must start with a forward slash and can be encrypted with the default KMS key. | <pre>object({<br> parameter_names = list(string)<br> })</pre> |`null`| no |
160
179
| ssm\_parameter\_names | DEPRECATED: use `ssm` object instead. This variable will be removed in version 6 of this module. (List of AWS Systems Manager Parameter Store parameters this Lambda will have access to. In order to decrypt secure parameters, a kms\_key\_arn needs to be provided as well.) |`list`|`[]`| no |
161
180
| tags | A mapping of tags to assign to the Lambda function and all resources supporting tags. |`map(string)`|`{}`| no |
162
-
| timeout | The amount of time your Lambda Function has to run in seconds. Defaults to 3. |`number`|`3`| no |
181
+
| timeout | The amount of time your Lambda Function has to run in seconds. |`number`|`3`| no |
163
182
| tracing\_config\_mode | Tracing config mode of the Lambda function. Can be either PassThrough or Active. |`string`|`null`| no |
164
183
| vpc\_config | Provide this to allow your function to access your VPC (if both 'subnet\_ids' and 'security\_group\_ids' are empty then vpc\_config is considered to be empty or unset, see https://docs.aws.amazon.com/lambda/latest/dg/vpc.html for details). | <pre>object({<br> security_group_ids = list(string)<br> subnet_ids = list(string)<br> })</pre> |`null`| no |
Copy file name to clipboardExpand all lines: docs/part1.md
+23-8Lines changed: 23 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,13 @@ should migrate to this module as a drop-in replacement for all provisions up to
27
27
28
28
The module can be used for all [runtimes](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) supported by AWS Lambda.
29
29
30
-
Deployment packages can be specified either directly as a local file (using the `filename` argument) or indirectly via Amazon S3 (using the `s3_bucket`, `s3_key` and `s3_object_versions` arguments), see [documentation](https://www.terraform.io/docs/providers/aws/r/lambda_function.html#specifying-the-deployment-package) for details.
30
+
Deployment packages can be specified either directly as a local file (using the `filename` argument), indirectly via Amazon S3 (using the `s3_bucket`, `s3_key` and `s3_object_versions` arguments)
31
+
or using [container images](https://docs.aws.amazon.com/lambda/latest/dg/lambda-images.html) (using `image_uri` and `package_type` arguments),
32
+
see [documentation](https://www.terraform.io/docs/providers/aws/r/lambda_function.html#specifying-the-deployment-package) for details.
0 commit comments