A repository containing docker images specific to AWS Lambda Service
481
(This guide assumes you have docker installed and configured on your local machine)
Here's the gist: we have a custom docker image that replicates the Amazon Linux environment that your EC2 instances have been running. Further, this image has all of the AWS C++ runtimes and SDK's installed so that the environment is as close to production as possible. But the trick is, we don't have to use AWS's cloud resources for testing (and getting billed accordingly) as we can run these lambda functions locally.
Pull the docker image onto your computer
docker pull 800869/lambda:cpp_runtime_image
Start a container with a mounted file location
docker run -i -t --name my_lambda_container -v /Users/jack/projects/test_lambda_functions:/home/test_lambda_functions 800869/lambda:cpp_runtime_image
Develop your lambda functions to your heart's content and build the c++ files inside of your container.
Run and test your lambda functions locally - using a separate docker image
docker run --rm -v /Users/jack/projects/test_lambda_functions/hello-cpp-world/build:/var/task -v /Users/jack/projects/test_lambda_functions/hello-cpp-world/build:/opt lambci/lambda:provided my_handler
Exit the container whenever you want
exit
To get back into the container, reboot the container, we won't create a new container, rather we will be resuming the one you created initially, so that your project files are still mounted the same.
docker start my_lambda_container
Resume a shell in your container
docker attach my_lambda_container
Content type
Image
Digest
Size
1.1 GB
Last updated
over 6 years ago
docker pull 800869/lambda:java8_gitlabci_image