Skip to content

Commit a451a38

Browse files
committed
feat: allow passing through lambda architectures
1 parent a4b6e10 commit a451a38

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ module "lambda_api" {
115115
| timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default) |
116116
| memory_size | number | Size of the memory of the lambda. CPU will scale along with it | 128 (same as terraform default) |
117117
| xray_enabled | bool | Whether or not the X-Ray daemon should be created with the Lambda API. | false |
118+
| architectures | list(string) | (Optional) Instruction set architecture for your Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]. Default is [\"x86_64\"]. Removing this attribute, function's architecture stay the same. | ["x86_64"] |
118119

119120
#### lambda_vpc_config
120121

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ resource "aws_lambda_function" "zip_api" {
254254
layers = var.lambda_layers
255255
timeout = var.timeout
256256
memory_size = var.memory_size
257+
architectures = var.architectures
257258

258259
tracing_config {
259260
mode = var.xray_enabled == true ? "Active" : "PassThrough"
@@ -285,6 +286,7 @@ resource "aws_lambda_function" "docker_api" {
285286
publish = true
286287
timeout = var.timeout
287288
memory_size = var.memory_size
289+
architectures = var.architectures
288290

289291
tracing_config {
290292
mode = var.xray_enabled == true ? "Active" : "PassThrough"

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,9 @@ variable "xray_enabled" {
146146
description = "Whether or not the X-Ray daemon should be created with the Lambda API."
147147
default = false
148148
}
149+
150+
variable "architectures" {
151+
type = list(string)
152+
description = "(Optional) Instruction set architecture for your Lambda function. Valid values are [\"x86_64\"] and [\"arm64\"]. Default is [\"x86_64\"]. Removing this attribute, function's architecture stay the same."
153+
default = ["x86_64"]
154+
}

0 commit comments

Comments
 (0)