Skip to content

OOTB generated python CF resource cannot be used with cfn test  #247

@carpnick

Description

@carpnick

Repro:

  • Install latest cloudformation-cli
  • Install master branch of this repo
  • Generate a new resource type - in my example I used python3.9
  • run cfn submit --dry-run
  • run sam build
  • in new terminal run sam local start-lambda
  • run just one contract test -cfn test -- -k contract_create_delete
  • Error from cryptography library:
  • Unable to import module 'dd_dd_test1.handlers': cannot import name 'ObjectIdentifier' from 'cryptography.hazmat.bindings._rust' (unknown location)

Environment:

  • cfn version - cfn 0.2.28
  • SAM version - SAM CLI, version 1.66.0
  • Operating System - macOS Monterey - 12.3.1
  • Architecture - Apple M1 Pro (arm64)
  • plugin version - cloudformation-cli-python-plugin @ git+https://github.com/aws-cloudformation/cloudformation-cli-python-plugin.git@fad3b0740a76c7bad0be18b08cb46f6e22973bde (master as of 01/17/2023)
  • requirements.txt (generated) - cloudformation-cli-python-lib>=2.1.9
  • Resolved cryptography library - cryptography 39.0.0

Research:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions