AWS Cloud9: Referencing Lambda Layer Locally
Unfortunately, AWS Cloud9 does not support Lambda layers at the moment.
AWS Cloud9 documentation says that is not supported to execute functions with layers from the AWS Resources window. But you can use sam local invoke
or aws lambda
on the Cloud9 terminal window. For instance
sam local invoke --event input.json --template ../template.yml <function_name>
will create a new docker image with the layer(s) dependencies that will be used to execute the lambda function. The TAG name is explained here
master:~/environment/ahdv (master) $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
samcli/lambda nodejs8.10-03eb754e9966a1a2f789d500d 6b52bcffdc2e About an hour ago 968MB
lambci/lambda python3.6 420212d009b3 3 weeks ago 1.03GB
lambci/lambda python2.7 7a436931435e 3 weeks ago 901MB
lambci/lambda nodejs4.3 c0914066d9a8 3 weeks ago 931MB
lambci/lambda nodejs6.10 74b405a65ed4 3 weeks ago 946MB
lambci/lambda nodejs8.10 edf1f613772c 3 weeks ago 960MB