Sign inSign up

800869/lambda

By 800869

•Updated over 6 years ago

A repository containing docker images specific to AWS Lambda Service

Image
0

481

800869/lambda repository overview

⁠Instructions for developing inside of the AWS C++ runtime environment and testing your Lambda Functions locally

(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.

  1. Pull the docker image onto your computer

    docker pull 800869/lambda:cpp_runtime_image

  2. 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

  3. Develop your lambda functions to your heart's content and build the c++ files inside of your container.

  4. 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

  5. Exit the container whenever you want

    exit

  6. 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

  7. Resume a shell in your container

    docker attach my_lambda_container

Tag summary

Content type

Image

Digest

Size

1.1 GB

Last updated

over 6 years ago

docker pull 800869/lambda:java8_gitlabci_image