Miserlou / Miserlou/lambda-packages
No module named pyasn1.codec.der
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 728
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
Hello.
So, I've been trying to include one of the libs from lambda-packages, and failed repeatedly :(
I'm hitting on the error in the title:
No module named pyasn1.codec.der
Specifically, I'm trying to get the cryptography module into my lambda deployment packages, but maybe I'm misunderstanding the quick guide:
But, if you want to use this project the other (wrong) way, just put the contents of the .tar.gz archive into your lambda .zip.
Yes, I'm sorry, but I can't jump on Zappa at this point (maybe after this proof of concept is done), but it seems like I shouldn't have to, right?
So.. working on a Mac, I:
- downloaded
lambda-packages-master.zip, extracted its contents - dug into
\lambda_packages\cryptography, - grabbed and extracted (to
libs-for-aws\cryptography) thecryptography-1.4.tar.gzarchive.
Then I built my Lambda Deployment Package, and added to it the libs-for-aws\cryptography directory.
Package via Cloud Formation, deploy to AWS, and, when my Lambda is triggered, I get a 500, and in CloudWatch logs I get this message (cauth is just the name of my Lambda package)
START RequestId: 938e62f0-18a2-11e7-a55f-d146b6ce0af9 Version: $LATEST
Unable to import module 'cauth': No module named pyasn1.codec.der
END RequestId: 938e62f0-18a2-11e7-a55f-d146b6ce0af9
Am I doing something wrong in the way I'm trying to include the cryptography package from lambda-packages?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Inspect lambda_packages/cryptography and the extracted cryptography-1.4.tar.gz contents first; then reproduce the AWS Lambda deployment using the described CloudFormation package and check the CloudWatch import error. Done means the deployed function imports cryptography without the pyasn1.codec.der error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, cryptography, python
- Domain
- build-system, cloud, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100