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
7 changes: 4 additions & 3 deletions crates/embucket-lambda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

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

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

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

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

# Watch locally for development
watch:
Expand Down
8 changes: 7 additions & 1 deletion crates/embucket-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ cargo lambda deploy --binary-name bootstrap
**Other Settings** (in `Cargo.toml`):
- Memory: `memory = 3008`
- Timeout: `timeout = 30`
- Environment variables: `[package.metadata.lambda.deploy.env]`
- Included files: `include = ["config"]`

**Environment Variables**
- Set envs using `ENV_FILE=.env` environment variable:
``` sh
ENV_FILE=".env.dev" make deploy
```
- It will deploy envs from `.env` if `ENV_FILE` not specified

### Test locally

```bash
Expand Down