From 4920776770585feb269f1d3b3bdc5394968f6198 Mon Sep 17 00:00:00 2001 From: DanCodedThis Date: Fri, 26 Dec 2025 19:29:57 +0200 Subject: [PATCH 1/2] fix --- crates/embucket-lambda/Makefile | 2 +- crates/embucket-lambda/README.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/embucket-lambda/Makefile b/crates/embucket-lambda/Makefile index 15491a28..dc3900c0 100644 --- a/crates/embucket-lambda/Makefile +++ b/crates/embucket-lambda/Makefile @@ -4,7 +4,7 @@ FUNCTION_NAME ?= embucket-lambda ENV_FILE ?= config/.env AWS_LAMBDA_ROLE_ARN := $(if $(AWS_LAMBDA_ROLE_ARN),--iam-role $(AWS_LAMBDA_ROLE_ARN)) -OTEL_COLLECTOR_LAYERS ?= $(if $(OTEL_COLLECTOR_LAYERS),--layer-arn $(OTEL_COLLECTOR_LAYERS)) +OTEL_COLLECTOR_LAYERS := $(if $(OTEL_COLLECTOR_LAYERS),--layer-arn $(OTEL_COLLECTOR_LAYERS)) # supported features: "streaming" FEATURES_PARAM := $(if $(FEATURES),--features $(FEATURES)) diff --git a/crates/embucket-lambda/README.md b/crates/embucket-lambda/README.md index 063eda07..6816919a 100644 --- a/crates/embucket-lambda/README.md +++ b/crates/embucket-lambda/README.md @@ -95,9 +95,7 @@ The easiest way is to add two layers to your lambda deployment. One of which wou --zip-file fileb://.zip --compatible-runtimes provided.al2 provided.al2023 --compatible-architectures arm64` -4. After which provide this as an external env variable (the first layer is the collector itself): `OTEL_COLLECTOR_LAYERS ?= \ - --layer-arn arn:aws:lambda:us-east-2:184161586896:layer:opentelemetry-collector-arm64-0_19_0:1\ - --layer-arn arn:aws:lambda:::layer::` +4. After which provide this as an external env variable (the first layer is the collector itself): `OTEL_COLLECTOR_LAYERS=arn:aws:lambda:us-east-2:184161586896:layer:opentelemetry-collector-arm64-0_19_0:1,arn:aws:lambda:::layer::` 5. Now you can deploy the function with the new layer. If you later update the configratuin and publish the layer again remember to change the layer `` number, after the first publish it is `1`. From 44e1544203e9a7a10b429b673e658316a25a7fbb Mon Sep 17 00:00:00 2001 From: DanCodedThis Date: Fri, 26 Dec 2025 19:49:15 +0200 Subject: [PATCH 2/2] fix --- crates/embucket-lambda/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/embucket-lambda/Makefile b/crates/embucket-lambda/Makefile index dc3900c0..4740bc94 100644 --- a/crates/embucket-lambda/Makefile +++ b/crates/embucket-lambda/Makefile @@ -3,8 +3,8 @@ # Function name (override with: make deploy FUNCTION_NAME=your-function) FUNCTION_NAME ?= embucket-lambda ENV_FILE ?= config/.env -AWS_LAMBDA_ROLE_ARN := $(if $(AWS_LAMBDA_ROLE_ARN),--iam-role $(AWS_LAMBDA_ROLE_ARN)) -OTEL_COLLECTOR_LAYERS := $(if $(OTEL_COLLECTOR_LAYERS),--layer-arn $(OTEL_COLLECTOR_LAYERS)) +AWS_LAMBDA_ROLE_ARN_PARAM := $(if $(AWS_LAMBDA_ROLE_ARN),--iam-role $(AWS_LAMBDA_ROLE_ARN)) +OTEL_COLLECTOR_LAYERS_PARAM := $(if $(OTEL_COLLECTOR_LAYERS),--layer-arn $(OTEL_COLLECTOR_LAYERS)) # supported features: "streaming" FEATURES_PARAM := $(if $(FEATURES),--features $(FEATURES)) @@ -17,7 +17,7 @@ deploy: build deploy-only public-url # Quick deploy without rebuild deploy-only: - cd ../.. && cargo lambda deploy $(OTEL_COLLECTOR_LAYERS) $(IAM_ROLE) --env-file $(ENV_FILE) --binary-name bootstrap $(FUNCTION_NAME) + cd ../.. && cargo lambda deploy $(OTEL_COLLECTOR_LAYERS_PARAM) $(AWS_LAMBDA_ROLE_ARN_PARAM) --env-file $(ENV_FILE) --binary-name bootstrap $(FUNCTION_NAME) aws logs create-log-group --log-group-name "/aws/lambda/$(FUNCTION_NAME)" >/dev/null 2>&1 || true public-url: