Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion infrastructure/terraform/modules/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ output "processor_lambda_error_rate_alarm_arn" {
| <a name="input_enable_dlq_messages_alarm"></a> [enable\_dlq\_messages\_alarm](#input\_enable\_dlq\_messages\_alarm) | Create a CloudWatch alarm when visible messages are present in the Lambda DLQ | `bool` | `true` | no |
| <a name="input_enable_duration_alarm"></a> [enable\_duration\_alarm](#input\_enable\_duration\_alarm) | Create a CloudWatch alarm when Lambda duration percentile exceeds the configured threshold | `bool` | `true` | no |
| <a name="input_enable_error_rate_alarm"></a> [enable\_error\_rate\_alarm](#input\_enable\_error\_rate\_alarm) | Create a CloudWatch alarm when Lambda error rate exceeds the configured percentage threshold | `bool` | `true` | no |
| <a name="input_enable_lambda_insights"></a> [enable\_lambda\_insights](#input\_enable\_lambda\_insights) | Enable the lambda insights layer, this must be disabled for lambda@edge usage | `bool` | `true` | no |
| <a name="input_enable_lambda_insights"></a> [enable\_lambda\_insights](#input\_enable\_lambda\_insights) | Enable the lambda insights layer, this must be disabled for lambda@edge usage | `bool` | `false` | no |
| <a name="input_enable_throttles_alarm"></a> [enable\_throttles\_alarm](#input\_enable\_throttles\_alarm) | Create a CloudWatch alarm when Lambda throttles exceed the configured threshold | `bool` | `true` | no |
| <a name="input_enable_xray_tracing"></a> [enable\_xray\_tracing](#input\_enable\_xray\_tracing) | Enable AWS X-Ray active tracing for the Lambda function. | `bool` | `false` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ resource "aws_lambda_function" "main" {

layers = local.package_type == "zip" ? compact(concat(
var.layers,
[
var.enable_lambda_insights && var.lambda_at_edge == false ? "arn:aws:lambda:${var.region}:580247275435:layer:LambdaInsightsExtension:53" : null
]
[local.lambda_insights_layer_arn]
)) : []

environment {
Expand Down
4 changes: 4 additions & 0 deletions infrastructure/terraform/modules/lambda/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ locals {

package_type = lower(var.package_type)

lambda_insights_layer_arn = var.enable_lambda_insights && !var.lambda_at_edge ? (
var.architecture == "arm64" ? "arn:aws:lambda:${var.region}:580247275435:layer:LambdaInsightsExtension-Arm64:20" : "arn:aws:lambda:${var.region}:580247275435:layer:LambdaInsightsExtension:53"
) : null

# Compound Scope Identifier
csi = replace(
format(
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/terraform/modules/lambda/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ variable "system_log_level" {
variable "enable_lambda_insights" {
type = bool
description = "Enable the lambda insights layer, this must be disabled for lambda@edge usage"
default = true
default = false
}

variable "enable_xray_tracing" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[Bb]undler
[Pp]npm
[Rr]epo
[Tt]erraform
Bitwarden
bot
Cognito
Expand Down Expand Up @@ -30,13 +27,16 @@ OAuth
Octokit
onboarding
Podman
[Pp]npm
Python
rawContent
relative_url
[Rr]epo
sed
simplifiable
sublicense
Syft
toolchain
Trivy
Trufflehog
[Tt]erraform
Loading