Skip to content
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

dependency aws-encryption-sdk v3.1.0 uses incompatible downstream dependency (cryptography >=40) #255

Open
jsonmart opened this issue Apr 13, 2023 · 5 comments

Comments

@jsonmart
Copy link

aws-encryption-sdk v3.1.0 (python hook runtime dependency) has a dependency on cryptogrpahy>2.5 (see https://github.com/aws/aws-encryption-sdk-python/blob/7950abd73ee333407d2dadd02ef2d57c3df464cf/requirements.txt#L2). This causes python hooks to be bundled with the latest version of cryptography (40.0.1), however the cryptography package has recently fully deprecated a method used by aws-encryption-sdk v3.1.0 (utils.verify_instance). This is resulting in a runtime exception for python hooks bundled with cloudformation-cli-python-lib v2.1.15:

Unable to import module 'x.handlers': cannot import name 'verify_interface' from 'cryptography.utils' (/var/task/cryptography/utils.py) 

aws-encryption-sdk v3.1.1 no longer uses the verify_instancemethod and looks like it could be a suitable replacement (see: https://github.com/aws/aws-encryption-sdk-python/releases/tag/v3.1.1).

@kremerpatrick
Copy link

Is there an easy way around this while we wait for the fix to be merged?

@jsonmart
Copy link
Author

@kremerpatrick - you can add cryptography<40.0.0 to requirements.txt in your generated hook package as a temporary workaround.

@kremerpatrick
Copy link

That worked, thank you!

@mrinaudo-aws
Copy link

Hi @jsonmart and @kremerpatrick - new versions of the plugin and the lib, cloudformation-cli-python-plugin-2.1.8 and cloudformation-cli-python-lib-2.1.16 are now available updates from pip as of yesterday, and include the merged PR mentioned above. You should now be able to expunge the temporary workaround, upgrade your local copies of the plugin and lib from pip, package your extension(s) as usual, and test without having the related error. Let us know!

@kremerpatrick
Copy link

That worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants