File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ Thumbs.db
2727
2828# Deployment artifacts
2929deployment /lambda_package.zip
30+ package /*
3031
3132# Terraform
3233terraform /.terraform /
Original file line number Diff line number Diff line change @@ -12,21 +12,9 @@ echo "Building Lambda package..."
1212rm -rf " $BUILD_DIR "
1313mkdir -p " $BUILD_DIR "
1414
15- # Check if Docker is available for cross-platform build
16- if command -v docker & > /dev/null; then
17- echo " Using Docker for cross-platform build (Amazon Linux 2023)..."
18-
19- # Install dependencies using Lambda Python image
20- docker run --rm \
21- --entrypoint " " \
22- -v " $PROJECT_ROOT :/var/task" \
23- -v " $BUILD_DIR :/var/build" \
24- public.ecr.aws/lambda/python:3.12 \
25- pip install -r /var/task/requirements-aws.txt -t /var/build --quiet --upgrade
26- else
27- echo " Docker not found, using local pip (may not work on Lambda)..."
28- pip3 install -r " $PROJECT_ROOT /requirements-aws.txt" -t " $BUILD_DIR " --quiet --upgrade
29- fi
15+ # Install dependencies
16+ echo " Installing Python dependencies..."
17+ pip3 install -r " $PROJECT_ROOT /requirements-aws.txt" -t package/ --quiet
3018
3119# Copy application code
3220echo " Copying application code..."
You can’t perform that action at this time.
0 commit comments