You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2021. It is now read-only.
Running the ./build-s3-dist.sh build script on macOS directly results in errors of the form:
Unable to import module 'transit_vpc_push_cisco_config/lambda_function': /var/task/bcrypt/_bcrypt.so: invalid ELF header
This seems to be because paramiko uses C wrappers for low level crypto functions, and the versions of these available on macOS do not run on Linux (and thus the lambda function does not run).
My solution to this was to build the function inside a docker container:
$ cat Dockerfile
# Docker image to build the lambda function
FROM python:2.7
RUN apt-get update && \
apt-get install zip -y && \
pip install --upgrade pip && \
pip install --upgrade setuptools && \
pip install --upgrade virtualenv
ENTRYPOINT ["/bin/bash", "-c"]
# Run with:
# docker build -t build-lambda . && docker run -it --rm -v $PWD:/tmp/workspace -w /tmp/workspace/deployment build-lambda ./build-s3-dist.sh bucket-name-here
I have a Makefile in my fork of the repo which runs this, if it's worth a pull request.
Either way, something in the README for how to build on OS X would be useful.
The text was updated successfully, but these errors were encountered:
Do you get similar deployment constraints on running on a EC2?. Docker container would be useful, we will further look into it and update the README accordingly for OS X. Thanks
Running the
./build-s3-dist.sh
build script on macOS directly results in errors of the form:This seems to be because paramiko uses C wrappers for low level crypto functions, and the versions of these available on macOS do not run on Linux (and thus the lambda function does not run).
My solution to this was to build the function inside a docker container:
I have a Makefile in my fork of the repo which runs this, if it's worth a pull request.
Either way, something in the README for how to build on OS X would be useful.
The text was updated successfully, but these errors were encountered: