Open miryee opened 5 years ago
Followed article, received error in CloudWatch:
File "/opt/aws", line 19, in
awscli-lambda-layer.zip was built on ubuntu 18, python 3.6.
I have the same problem as above. Has anyone managed to actually get this working?
+1 on the problem. Anyone found a fix?
@autodeck @vibhor2006 Sorry for late reply As far as i remember i have used this: https://github.com/aws-samples/aws-lambda-layer-awscli/blob/master/build.sh
Hi there, I've just submitted this pull request https://github.com/ilyabezdelev/aws-cli-lambda/pull/6 to fix scripts while packaing the zip. This solved the ModuleNotFoundError: No module named 'awscli'
error for me. HTH
Built and uploaded the layer.
Update:
Got the binary working by calling:
/opt/aws
instead of aws ..
-- makes sense since /opt/ isn't in $PATH
I followed the steps outlined in https://bezdelev.com/hacking/aws-cli-inside-lambda-layer-aws-s3-sync/
I can use aws command inside the virtualenv on my linux box and I verified the environment path is set to #!/var/lang/bin/python in aws_completer.
The versions I have in my virtual environment are: aws-cli 1.16.196 Python 3.6.8 Linux 4.18.0-25-generic botocore 1.12.186 pip 19.1.1 from .home/myee/AWS/awscli-virtualenv/lib/python3.6/site-packages/pip (python 3.6)
Trying to run a test in a lambda function that only executes "/opt/aws --version", it produces an error that awscli cannot be found. When I run the same lambda function that only executes "which aws" it returns
which: no aws in (/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin)
Any suggestions?