aws / aws/aws-codebuild-docker-images
Issue with `cffi` package in aws/codebuild/amazonlinux2-x86_64-standard:3.0
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 971
- Avg merge
- 2h 47m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
We used to build an SAM app using the aws/codebuild/amazonlinux2-x86_64-standard:2.0, and all were running perfectly. The build stages includes the `pip install` of a requirements.txt set of packages, as well as a `sam package`. The requirements.txt doesn't include the `cffi` package, so it must be included within the image somewhere.
Due to that version being decommissioned, we changed the build image to aws/codebuild/amazonlinux2-x86_64-standard:3.0. Since changing to that, the builds succeed but we get the following error when invoking that lambda:
`[ERROR] Runtime.ImportModuleError: Unable to import module 'operations.executor': No module named '_cffi_backend'`
We tried many different fixes, but all of them failed:
1. Installing the package through the requirements.
2. Installing the package after the requirements, separately (pip install cffi).
3. Force reinstalling it (pip -vvv install --upgrade --force-reinstall cffi).
4. Changing the image to Ubuntu:5.0
**To Reproduce**
Not sure how to reproduce the error, as I can't trace where that package is located.
**Expected behavior**
I expect that the AL2-standard:3.0 image to have the same behaviour as the 2.0.
**Logs**
`[ERROR] Runtime.ImportModuleError: Unable to import module 'operations.executor': No module named '_cffi_backend'`
**Platform (please complete the following information):**
- Codebuild using the aws/codebuild/amazonlinux2-x86_64-standard:3.0
- Lambda running on python 3.8, x86_64
**Additional context**
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.