-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1019 Bytes
/
Makefile
File metadata and controls
39 lines (32 loc) · 1019 Bytes
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
39
# LocalStack Lambda: https://docs.localstack.cloud/user-guide/aws/lambda/
# Terraform with LocalStack: https://github.com/localstack/terraform-local
start:
docker compose up
# https://docs.aws.amazon.com/lambda/latest/dg/python-package.html#python-package-native-libraries
# For Python packages without a compatible wheel distribution, you need to build the C/C++ libraries yourself, preferrably using Docker.
install:
pip install \
--platform manylinux2014_x86_64 \
--target=package \
--implementation cp \
--python-version 3.12 \
--only-binary=:all: \
--upgrade \
--requirement requirements.txt \
--target build/my-lambda-layer/python
init:
tflocal init
deploy:
tflocal apply --auto-approve
invoke:
aws --endpoint http://localhost:4566 lambda invoke \
--function-name my-lambda-function \
--cli-binary-format raw-in-base64-out \
--no-cli-pager \
output.json
cat output.json
clean:
rm -rf build
rm -rf .terraform
rf -f output.json
.PHONY: start install init deploy invoke clean