I've got a pyproject.toml with the following dependencies:
[tool.poetry.dependencies]
python = "~3.12.0"
bedrock = {path = "../../lib/local-dependency", develop = true}
boto3 = "1.35.73"
structlog = "24.4.0"
and this config:
[tool.poetry-plugin-lambda-build]
docker-image = "public.ecr.aws/sam/build-python3.12:latest-x86_64"
docker-network = "host"
package-artifact-path = "lambda_function.zip"
without = "dev"
poetry build-lambda worked fine without the docker config, but I am running on Mac, so need to build in a container. After adding docker-image and docker-network I get:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/usr/lib/local-dependency'
local-dependency is in the same repo as the lambda code, but in a parent directory of the lambda, so isn't copied into the container.
I've got a pyproject.toml with the following dependencies:
and this config:
poetry build-lambdaworked fine without the docker config, but I am running on Mac, so need to build in a container. After addingdocker-imageanddocker-networkI get:local-dependencyis in the same repo as the lambda code, but in a parent directory of the lambda, so isn't copied into the container.