diff --git a/README.md b/README.md index 95dd825..e9c7261 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ A ZIO-based AWS Custom Runtime compatible with GraalVM Native Image. ```scala libraryDependencies += "dev.zio" %% "zio-json" % "0.6.2" -libraryDependencies += "dev.zio" %% "zio-lambda" % "1.0.4" +libraryDependencies += "dev.zio" %% "zio-lambda" % "1.0.5" // Optional dependencies -libraryDependencies += "dev.zio" %% "zio-lambda-event" % "1.0.4" -libraryDependencies += "dev.zio" %% "zio-lambda-response" % "1.0.4" +libraryDependencies += "dev.zio" %% "zio-lambda-event" % "1.0.5" +libraryDependencies += "dev.zio" %% "zio-lambda-response" % "1.0.5" ``` ## Usage @@ -52,10 +52,10 @@ Each release will contain a zip file ready to be used as a lambda layer) and you 1. Create an AWS Lambda function and choose the runtime where you provide your own bootstrap on Amazon Linux 2 - ![create-lambda](docs/https://user-images.githubusercontent.com/14280155/164102664-3686e415-20be-4dd9-8979-ea6098a7a4b9.png) + ![create-lambda](https://user-images.githubusercontent.com/14280155/164102664-3686e415-20be-4dd9-8979-ea6098a7a4b9.png) 2. Run `sbt GraalVMNativeImage/packageBin`, we'll find the binary present under the `graalvm-native-image` folder: - ![binary-located](docs/https://user-images.githubusercontent.com/14280155/164103337-6645dfeb-7fc4-4f7f-9b13-8005b0cddead.png) + ![binary-located](https://user-images.githubusercontent.com/14280155/164103337-6645dfeb-7fc4-4f7f-9b13-8005b0cddead.png) 3. Create the following bootstap file (which calls out to the binary) and place it in the same directory alongside the binary: ```bash @@ -66,7 +66,7 @@ Each release will contain a zip file ready to be used as a lambda layer) and you ./zio-lambda-example ``` - ![bootstrap-alongside-native-binary](docs/https://user-images.githubusercontent.com/14280155/164103935-0bf7a6cb-814d-4de1-8fa1-4d0d54fb6e88.png) + ![bootstrap-alongside-native-binary](https://user-images.githubusercontent.com/14280155/164103935-0bf7a6cb-814d-4de1-8fa1-4d0d54fb6e88.png) 4. Now we can zip both these files up: ```log @@ -77,11 +77,11 @@ Each release will contain a zip file ready to be used as a lambda layer) and you 5. Take `upload.zip` and upload it to AWS Lambda and test your function: - ![lambda-ui](docs/https://user-images.githubusercontent.com/14280155/164104747-039ec584-d3e2-4b47-884d-ff88977e2b53.png) + ![lambda-ui](https://user-images.githubusercontent.com/14280155/164104747-039ec584-d3e2-4b47-884d-ff88977e2b53.png) 6. Test everything out to make sure everything works: - ![test-ui](docs/https://user-images.githubusercontent.com/14280155/164104858-a720ac55-b9bb-47ec-af70-c4bd5eb5bed3.png) + ![test-ui](https://user-images.githubusercontent.com/14280155/164104858-a720ac55-b9bb-47ec-af70-c4bd5eb5bed3.png) ## Deployment of native image binary in a Docker container @@ -114,13 +114,13 @@ docker push : Here is an example: -![image-uploaded](docs/https://user-images.githubusercontent.com/14280155/164120591-68a78d19-c56b-4793-96b8-cfe567443063.png) +![image-uploaded](https://user-images.githubusercontent.com/14280155/164120591-68a78d19-c56b-4793-96b8-cfe567443063.png) Create a Lambda function and choose container image: -![lambda-create-container-image](docs/https://user-images.githubusercontent.com/14280155/164120637-9c827736-26a8-4c65-92d4-2919157bbda6.png) +![lambda-create-container-image](https://user-images.githubusercontent.com/14280155/164120637-9c827736-26a8-4c65-92d4-2919157bbda6.png) -![image](docs/https://user-images.githubusercontent.com/14280155/164120764-2c736a46-29e3-488c-ba6a-e2b69ef51792.png) +![image](https://user-images.githubusercontent.com/14280155/164120764-2c736a46-29e3-488c-ba6a-e2b69ef51792.png) Please note that because you incur the overhead of your native binary residing within a Docker container, there is more overhead than the other approach of deploying the binary straight to AWS Lambda diff --git a/project/plugins.sbt b/project/plugins.sbt index 898f25c..d77dd28 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,6 +9,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4") -addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.10") +addSbtPlugin("dev.zio" % "zio-sbt-website" % "0.3.9") resolvers += Resolver.sonatypeRepo("public")