Skip to content
Merged
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
6 changes: 3 additions & 3 deletions crates/embucket-lambda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions crates/embucket-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ The easiest way is to add two layers to your lambda deployment. One of which wou
--zip-file fileb://<filename>.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:<region>:<account_id>:layer:<layername>:<version>`
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:<region>:<account_id>:layer:<layername>:<version>`
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 `<version>` number, after the first publish it is `1`.
Expand Down