/ Makefile
Makefile
1 .ONESHELL: deploy-backend deploy-frontend invalidate-cache full_deploy 2 3 update: 4 cd infrastructure 5 terraform get -update=true 6 7 deploy-backend: 8 cd infrastructure 9 terraform validate && terraform apply 10 11 deploy-frontend: 12 cd frontend 13 npm i 14 npm run package 15 cd ../infrastructure 16 terraform apply 17 18 invalidate-cache: 19 aws cloudfront create-invalidation --distribution-id E3TMYMHI6W1ORT --paths "/*" --region us-east-1 20 21 full_deploy: deploy-backend deploy-frontend invalidate-cache 22 echo "done" 23 24 25 build-local: 26 cd backend 27 docker build --platform linux/x86_64 -t lambdas . 28 docker run --platform linux/x86_64 -p 9000:8080 lambdas 29 30 test-lambda: 31 curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"resource": "/", "path": "/", "httpMethod": "GET", "requestContext": {}, "multiValueQueryStringParameters": null}'