From 4995878a69a04d070d7a2e39917c5d15ad8b2b59 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Tue, 6 Sep 2022 11:49:41 +0200 Subject: [PATCH] fix: Use a writeable cache directory Temporary workaround - see . --- infrastructure/constructs/lambda_layers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/constructs/lambda_layers.py b/infrastructure/constructs/lambda_layers.py index c574eb887..fb92419ff 100644 --- a/infrastructure/constructs/lambda_layers.py +++ b/infrastructure/constructs/lambda_layers.py @@ -13,6 +13,10 @@ def __init__(self, scope: constructs.Construct, stack_id: str, *, env_name: str) self, f"{env_name}-botocore-lambda-layer", entry="infrastructure/constructs/lambda_layers/botocore", + bundling=aws_lambda_python_alpha.BundlingOptions( + # See https://github.com/aws/aws-cdk/issues/21867#issuecomment-1234233411 + environment={"POETRY_VIRTUALENVS_IN_PROJECT": "true"} + ), compatible_runtimes=[PYTHON_RUNTIME], description="botocore library", )