ripe-cpu-85141
08/09/2022, 11:01 PMboto3.__version__
I get 1.20.32, which I think is the boto3 version included in the runtime.
Is there a way to force the usage of the packaged boto3 over the one on the runtime?hundreds-father-404
08/09/2022, 11:04 PMhundreds-father-404
08/09/2022, 11:05 PMripe-cpu-85141
08/09/2022, 11:15 PMhundreds-father-404
08/09/2022, 11:16 PMripe-cpu-85141
08/09/2022, 11:16 PMripe-cpu-85141
08/09/2022, 11:27 PMripe-cpu-85141
08/09/2022, 11:28 PMhundreds-father-404
08/09/2022, 11:29 PMripe-cpu-85141
08/10/2022, 1:36 AMhundreds-father-404
08/10/2022, 1:41 AMpython_awslambda
, but it should be easy to add. Interested in opening a PR?hundreds-father-404
08/10/2022, 1:43 AMPexInheritPathField
to PythonAwsLambdaTarget.core_fields
, similar to https://github.com/pantsbuild/pants/blob/63c9f68d69ecbba7e154230f71e3c241ea7fc3bb/src/python/pants/backend/python/target_types.py#L613-L642
2. Add the field to the field set here: https://github.com/pantsbuild/pants/blob/63c9f68d69ecbba7e154230f71e3c241ea7fc3bb/src/python/pants/backend/awslambda/python/rules.py#L51-L59
3. Add the argument to the argv in the same rules.py file, with this logic https://github.com/pantsbuild/pants/blob/63c9f68d69ecbba7e154230f71e3c241ea7fc3bb/src/python/pants/backend/python/goals/package_pex_binary.py#L88-L89hundreds-father-404
08/10/2022, 1:43 AMripe-cpu-85141
08/10/2022, 1:47 AMripe-cpu-85141
08/10/2022, 1:47 AMhundreds-father-404
08/10/2022, 1:49 AM.zip
rather than .pex
hundreds-father-404
08/10/2022, 1:50 AMpackage_pex_binary.py
and python/awslambda/rules.py
, they are extremely similarhappy-kitchen-89482
08/10/2022, 1:51 AMlambdex
that takes a regular .pex and emits a .zip file that is essentially the same pex, but whose entry point is a valid lambda handler function, and some machinery to glue that to the original pex entry point.happy-kitchen-89482
08/10/2022, 1:51 AMripe-cpu-85141
08/10/2022, 1:54 AMhundreds-father-404
08/10/2022, 1:58 AMripe-cpu-85141
08/10/2022, 2:02 AMhundreds-father-404
08/10/2022, 2:03 AMhundreds-father-404
08/10/2022, 2:04 AMpants_version
in pants.toml
happy-kitchen-89482
08/10/2022, 2:08 AMhundreds-father-404
08/10/2022, 2:09 AMripe-cpu-85141
08/10/2022, 2:48 AMenough-analyst-54434
08/10/2022, 5:27 PMWe’ve had reports that lambdex-created lambdas incur greater startup overhead in the warm scenario.It would be great if there were an issue for this, but this is "expected". A standard lambda has only /tmp write access and that storage is ephemeral; so PEX_ROOT gets redirected there and then promptly nuked after the lambda finishes. Each lambda run incurs what is normally a 1-time PEX extract cost. To make a PEX fast on lambda requires mounting EFS and configuring a PEX_ROOT env var to point to it or else using a container fwict. ... so re-working the Pants lambda support seems like a good idea.
enough-analyst-54434
08/10/2022, 5:41 PMfallback
. I was able to repro, then correct using this just now.enough-analyst-54434
08/10/2022, 5:43 PMhundreds-father-404
08/10/2022, 5:45 PMenough-analyst-54434
08/10/2022, 5:49 PMhappy-kitchen-89482
08/10/2022, 5:53 PMhappy-kitchen-89482
08/10/2022, 5:53 PMripe-cpu-85141
08/12/2022, 3:43 PMPEX_INHERIT_PATH
, I didn't think to check that. To be honest, I considered the pants target to be my interface, I didn't think of looking at the pex level. But it makes sense. 🙂enough-analyst-54434
08/12/2022, 3:54 PMpex --help-variables
and PEX_TOOLS=1 ./your.pex
. The latter only works if you use `pex_binary(include_tools=True)`or `pex_binary(execution_mode="venv")`but you can also pex-tools ./your.pex
.