Closed mmaeng closed 1 year ago
Cryptography v 40.0.0 looks to cause cfn test to fail contract testing. Looks like a function has been deprecated.
cfn test
local sam output
Invoking awssamples_ec2_importkeypair.handlers.resource (python3.7) Skip pulling image and use local one: public.ecr.aws/sam/emulation-python3.7:rapid-1.59.0-x86_64. Mounting /local/home/xxxxx/3p_debug/new_resource/aws-cloudformation-samples/resource-types/awssamples-ec2-importkeypair/python/build as /var/task:ro,delegated inside runtime container START RequestId: ebda989b-3011-498b-82e0-73a8071a9efe Version: $LATEST Traceback (most recent call last): Unable to import module 'awssamples_ec2_importkeypair.handlers': cannot import name 'verify_interface' from 'cryptography.utils' (/var/task/cryptography/utils.py)
Workshop used is https://github.com/aws-cloudformation/aws-cloudformation-samples/tree/main/resource-types/awssamples-ec2-importkeypair/python
https://github.com/aws-cloudformation/aws-cloudformation-samples/tree/main/resource-types/awssamples-ec2-importkeypair/python
adding cryptography<40.0.0 to requirements.txt file in the workshop resolves the issue. https://github.com/aws-cloudformation/aws-cloudformation-samples/blob/main/resource-types/awssamples-ec2-importkeypair/python/requirements.txt
cryptography<40.0.0
Cryptography v 40.0.0 looks to cause
cfn test
to fail contract testing. Looks like a function has been deprecated.local sam output
Workshop used is
https://github.com/aws-cloudformation/aws-cloudformation-samples/tree/main/resource-types/awssamples-ec2-importkeypair/python
adding
cryptography<40.0.0
to requirements.txt file in the workshop resolves the issue. https://github.com/aws-cloudformation/aws-cloudformation-samples/blob/main/resource-types/awssamples-ec2-importkeypair/python/requirements.txt