Skip to content

Commit b03d23a

Browse files
remove envs section from embucket-lambda manifest (#87)
* pass env to deploy * upd readme
1 parent 031bdaa commit b03d23a

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

crates/embucket-lambda/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
# Function name (override with: make deploy FUNCTION_NAME=your-function)
44
FUNCTION_NAME ?= embucket-lambda
5+
ENV_FILE ?= .env
56
# supported features: "streaming"
67
FEATURES_PARAM := $(if $(FEATURES),--features $(FEATURES))
78

89
build:
910
cd ../.. && cargo lambda build --release --arm64 --manifest-path crates/embucket-lambda/Cargo.toml $(FEATURES_PARAM)
1011

1112
# Deploy to AWS (must run from workspace root for include paths to work)
12-
deploy: build
13-
cd ../.. && cargo lambda deploy --binary-name bootstrap $(FUNCTION_NAME)
13+
deploy: build deploy-only
14+
@echo "Deployed $(FUNCTION_NAME) to AWS"
1415

1516
# Quick deploy without rebuild
1617
deploy-only:
17-
cd ../.. && cargo lambda deploy --binary-name bootstrap $(FUNCTION_NAME)
18+
cd ../.. && cargo lambda deploy --binary-name bootstrap $(FUNCTION_NAME) --env-file $(ENV_FILE)
1819

1920
# Watch locally for development
2021
watch:

crates/embucket-lambda/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,15 @@ cargo lambda deploy --binary-name bootstrap
6868
**Other Settings** (in `Cargo.toml`):
6969
- Memory: `memory = 3008`
7070
- Timeout: `timeout = 30`
71-
- Environment variables: `[package.metadata.lambda.deploy.env]`
7271
- Included files: `include = ["config"]`
7372

73+
**Environment Variables**
74+
- Set envs using `ENV_FILE=.env` environment variable:
75+
``` sh
76+
ENV_FILE=".env.dev" make deploy
77+
```
78+
- It will deploy envs from `.env` if `ENV_FILE` not specified
79+
7480
### Test locally
7581

7682
```bash

0 commit comments

Comments
 (0)