Skip to content

New python cryptography causes contract tests to fail #253

Closed
@mmaeng

Description

@mmaeng

Cryptography v 40.0.0 looks to cause cfn test to fail contract testing. Looks like a function has been deprecated.

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions