-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-lambda-python-alpha): I'm failing to bundle a Python 3.12 function using pipenv. #30170
Comments
Unfortunately, I wasn't able to reproduce the issue on my machine using the provided snippets, both using CDK 2.141.0 and the current CDK 2.142.1. Using the provided stack and Pipfile, with Pipfile both under the |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Please check the following repository for the directory structure. I am using pyenv and the version is as follows.
The version of the Docker command is as follows.
Please let me know if there is any other information you need. |
Thanks for providing the repository! I can confirm the error on my end as well, and will look into it. In the meantime, it seems like you can work around this by downgrading to Python 3.11.9 or lower, since it seems like the issue sprouted from a change in Python 3.12 that's not playing nice with older versions of pipenv. |
I'm getting a similar error when bundling, but in my case I'm using a requirements.txt. Currently, I'm using cdk-lib v2.124.0 due to other project constraints I'm working on. The workaround for me was to drop the Lambda Function's runtime to 3.11. |
* Bump db layer to Py3.12 * Bump root devtools to Py3.12 * Bump date_generator to Py3.12 * Bump downloader to Py3.12 * Bump link_fetcher to Py3.12 * Bump mock_scihub_product_api to Py3.12 * Bump mock_scihub_search_api to Py3.12 * Bump requeuer to Py3.12 * Bump Lambda runtimes to Py3.12 * Install Py3.12 in GH Actions * Bump and relock flake8 & isort * Bump boto3 and psycopg2 to supported versions * Bump moto and update decorator usage for v5 (only mock_aws now) * Upgrade alembic_migration * Mocked SQS queue name is unique per test * Update alembic_migration use of moto^=5 * Try to fix missing urllib3 despite it being in lockfile * Support CDK v2 * sigh downgrade to 3.11 because of aws/aws-cdk#30170 * Bump boto3/botocore + requests * fix lint * Bump tox to run on py311 for integration tests * Remove deprecated psycopg2-layer since db layer includes psycopg2-binary * Bump reference to Py38 in integration tests workflow * Bump versions mentioned in README * Zap remaining use of CDK v1 in app_integration * Fix CDK v2 use of aws_lambda_python (alpha) * Fix missing downgrade from 3.12->3.11 * replace black/isort/flake8 with ruff * use package.json as source of truth for cdk install * Deploy stack w/ permissions boundary on resources * Specify permissions boundary via full ARN * Ensure permissions boundary is passed via .env * cleanup references to isort/flake8/black
Can we get an update here ? |
Describe the bug
When trying to export the Pipfile to requirements.txt, I encounter the following error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
Expected Behavior
I expect to successfully bundle.
Current Behavior
Reproduction Steps
I'm using the following stack.
When I run cdk synth with the Pipfile placed in the src entry point, it results in an error.
Possible Solution
There is the following description in the Dockerfile.
I think it would be fine to upgrade the version of pipenv, as Python 3.6 is no longer supported by Lambda.
The same error was present up to pipenv==2023.3.20, but it seems that from pipenv==2023.4.20 onwards, the error does not occur
Additional Information/Context
No response
CDK CLI Version
2.141.0 (build 3d1c06e)
Framework Version
No response
Node.js Version
v18.16.0
OS
Windows (WSL2)
Language
TypeScript
Language Version
Typescript (5.4.5)
Other information
No response
The text was updated successfully, but these errors were encountered: