File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33# Function name (override with: make deploy FUNCTION_NAME=your-function)
44FUNCTION_NAME ?= embucket-lambda
5+ ENV_FILE ?= .env
56# supported features: "streaming"
67FEATURES_PARAM := $(if $(FEATURES ) ,--features $(FEATURES ) )
78
89build :
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
1617deploy-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
2021watch :
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments