Hi all, I'm trying to use an env var in a BUILD fi...
# general
q
Hi all, I'm trying to use an env var in a BUILD file, specifically for the
runtime
field in a
python_awslambda target
. If I do this:
Copy code
python_awslambda(
    name="configuration_change",
    runtime=env("LAMBDA_PYTHON_VERSION"),
    handler="configuration_service.py:configuration_change_handler",
)
I get the error:
The python_awslambda target [/snip]configuration_change must specify either a runtime or complete_platforms or both.
Is this possible?
1
b
That suggests to me that the LAMBDA_PYTHON_VERSION environment variable isn't being propagated into the BUILD file properly, and thus that is ending up as something like
runtime=None
. Can you confirm you're running with that env var set as you'd expect?
q
Ahh yes, I am a goose, the env var simply wasn't set 🤦‍♀️ Thank you kindly
👍 1