build_lambdas.sh 644 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # Build Lambda deployment packages
  3. set -e
  4. cd "$(dirname "$0")/../lambdas"
  5. # Build layer (shared dependencies)
  6. echo "Building Lambda layer..."
  7. rm -rf layer_build layer.zip
  8. mkdir -p layer_build/python
  9. pip install requests pycryptodome -t layer_build/python -q
  10. cd layer_build && zip -r ../layer.zip python -q && cd ..
  11. rm -rf layer_build
  12. echo " layer.zip created"
  13. # Build each function
  14. for fn in submit download transcribe_start transcribe_check summarize notify; do
  15. echo "Building ${fn}..."
  16. rm -f ${fn}.zip
  17. zip ${fn}.zip ${fn}.py shared.py -q
  18. echo " ${fn}.zip created"
  19. done
  20. echo "Done! All Lambda packages built."