Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
/ java-lambda-test Public archive

A small project to experiment with deploying Java applications to AWS Lambda with Docker.

License

Notifications You must be signed in to change notification settings

afwolfe/java-lambda-test

Repository files navigation

java-lambda-test

A small project to experiment with deploying Java applications to AWS Lambda with Docker.

Overview

The project is built with:

  • Docker
  • Java 11
  • Gradle

The project will build and deploy a fat/uber JAR to the Lambda Docker container.

Usage

Included are a pair of basic shell scripts, build.sh and run.sh which will build and start the container locally:

  1. Build the Docker image:
    • docker build -t java-lambda-test:latest -f Dockerfile .
    • Use Dockerfile.dev to just copy the locally built jar into the image for faster testing.
  2. Run the Docker image:
    • docker run -p 9000:8080 java-lambda-test:latest
  3. Use an API client or curl to invoke the Lambda:
    • curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"name":"afwolfe", "id":1}'

Acknowledgements/Resources

About

A small project to experiment with deploying Java applications to AWS Lambda with Docker.

Topics

Resources

License

Stars

Watchers

Forks