OOTB generated python CF resource cannot be used with cfn test
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Reproduce the failure with the listed cloudformation-cli, SAM, macOS arm64, and generated-resource steps, ending with cfn test -- -k contract_create_delete. Then inspect src/cloudformation_cli_python_lib/cipher.py, src/setup.py, and the generated requirements.txt around the aws-encryption-sdk and cryptography constraints. Done means the generated resource can run the contract test without the ObjectIdentifier import error.
Written by the indexing model from the issue text.
Description
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:
- User having issues with python3.8 in lambda environment - https://stackoverflow.com/questions/75129142/aws-lambda-cannot-import-name-objectidentifier-from-cryptography-hazmat-b
aws-encryption-sdkonly requires 3.4.0 or above currently. This is used here. And defined here
- Dominant language
- Python
- Stars
- 107
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-cloudformation/cloudformation-cli-python-plugin
-
Support UV Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Repo alive? Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
aws-cloudformation/cloudformation-cli-python-plugin#270 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-cloudformation/cloudformation-cli-python-plugin#268 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
aws-cloudformation/cloudformation-cli-python-plugin#264 · 1 comment ·
All issues in aws-cloudformation/cloudformation-cli-python-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·