CodeCatalyst: pip install failed on Lambda using Active images

0

Hi,

We use test action aws/managed-test@v1 as part of our workflow in CodeCatalyst.

To test our Python Lambda's code, we installed some extra package using pip install before running pytest. Recently we add iceberg in our stack, so we need to test our Lambda's code using the package pyiceberg.

But the action failed to run when we try to do pip install pyiceberg with the error: ERROR: Cannot set --home and --prefix together

This is similar to the issue mentioned in https://github.com/pypa/pip/issues/11129

In fact, when I tried to do pip config debug on the Compute.Type Lambda, it was:

env_var:
env:
global:
/etc/xdg/pip/pip.conf, exists: False
/etc/pip.conf, exists: True
global.target: /tmp/opt/python/site-packages
site:
/usr/local/pip.conf, exists: False

When I did the same thing on the Compute.Type EC2, it doesn't have global.target as part of the config. But since we can't use sudo to run a command in Steps, I can't remove the global.target from pip config. My currently workaround is running our test on Compute.Type EC2 instead of Lambda.

Should this be considered as a bug to be fix ? Any other recommendation to fix the issue so that we can continue to run our tests on the Compyte.Type Lambda?

Thanks in advance for your help.

Vu Hai
asked 22 days ago35 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions