-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 1.06 KB
/
Copy pathMakefile
File metadata and controls
38 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export AWS_ACCESS_KEY_ID ?= test
export AWS_SECRET_ACCESS_KEY ?= test
export AWS_DEFAULT_REGION=us-east-1
SHELL := /bin/bash
## Show this help
usage:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
## Install dependencies
install:
@which lstk || npm install -g @localstack/lstk
@which aws || pip install awscli
@which sam || pip install aws-sam-cli
# Deploy the infrastructure
build:
lstk sam build;
## Deploy the infrastructure
deploy:
lstk sam deploy --resolve-s3 --no-confirm-changeset;
## Start LocalStack in detached mode
start:
@test -n "${LOCALSTACK_AUTH_TOKEN}" || (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token"; exit 1)
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) LOCALSTACK_DEBUG=1 lstk start
## Stop the Running LocalStack container
stop:
@echo
lstk stop
## Save the logs in a separate file, since the LS container will only contain the logs of the last sample run.
logs:
@lstk logs > logs.txt
.PHONY: usage install run start stop logs