-
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): The command "export" does not exist - Poetry #32762
Comments
Hi I didn't get it. Where is the new lambda.PythonLayerVersion(this, "TestLayer", {
entry: path.join(__dirname, "../layer"),
description: "Test Lambda Layer with Poetry dependencies",
compatibleRuntimes: [cdk.aws_lambda.Runtime.PYTHON_3_11],
}); And this sounds like an issue from poetry 2.0 and requires a plugin from poetry to work it around? |
Hey @pahud, please check which version of There was fix for installing correct version of poetry during lambda build in In my case I was using older version of aws-cdk where poetry version wasn't locked and with recent release of poetry (v2.0.0) bundling of lambda broke because it installed poetry version 2 where poetry export was dropped. |
I'm seeing similar issues in a couple of my AWS codepipelines now. I've not been able to find any way to pin the poetry version being used by the cdk synth command. Also see this thread: |
Thank you @igorsimko @sr-rossanderson. Looks like this issue is similar to #26823 Let me verify again. |
Hi Looks at this
Looks like current I am using the
|
Yes the version pinning starts from |
Describe the bug
Our python poetry lambda deployments started failing with the error message
The command "export" does not exist
. I guess this is due to the recent poetry 2.0 release (https://github.com/python-poetry/poetry/releases/tag/2.0.0) that removes the export command and relies on the poetry-plugin-export plugin instead. The issue can be solved by using a custom build image that installs the plugin, this is the Dockerfile that worked for me: https://github.com/aws/aws-cdk/pull/32761/files.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Lambda bundling succeeds.
Current Behavior
Bundling fails with
The command "export" does not exist
Reproduction Steps
Possible Solution
Install plugin in build image, see https://github.com/aws/aws-cdk/pull/32761/files
Additional Information/Context
No response
CDK CLI Version
2.142.1
Framework Version
No response
Node.js Version
18.0.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: