-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
28 lines (21 loc) · 836 Bytes
/
Makefile
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
.PHONY: deps clean build
export GO111MODULE=on
export AWS_DEFAULT_REGION=us-west-2
export AWS_REGION=us-west-2
BINARY_NAME=handler
BUCKET_NAME=serialized-sam-deploy
all: deps build
build:
cd code && GOOS=linux GOARCH=amd64 go build -o $(BINARY_NAME) main.go
deps:
cd code && go get -u ./...
clean:
rm -rf ./code/handler
dynamotest:
cd code/store/ && export TABLE_NAME=rpslp_connections && aws-vault exec serialized -- go test
package:
aws-vault exec serialized -- sam package --template-file template.yaml --output-template-file packaged.yaml --s3-bucket $(BUCKET_NAME)
deploy:
aws-vault exec --no-session serialized -- sam deploy --template-file packaged.yaml --stack-name rockpaper-app --capabilities CAPABILITY_IAM
logs:
aws-vault exec serialized -- cw tail /aws/lambda/rockpaper-app-RPSLPFunction-1C3IOJ778925N -b 5m