AWS Lambda is the platform for deploying functions to the AWS cloud. You can use it to develop functions that respond to AWS events (eg S3 uploads, DynamoDB inserts), AWS API calls, or via HTTP endpoints using the API Gateway. By Jason Swartz.
In this tutorial you’ll learn how to create a new Lambda function in Scala, accessible via an API Gateway HTTP endpoint but also testable locally with Docker. This tutorial has been tested with Scala 2.12.8, SBT 0.13.18, and SAM-CLI 0.15.0.
The article is a straight step by step tutorial covering:
- Requirements
- The Project
- About The SBT Build
- About The Java Entrypoint
- About The Scala Handler
- About The SAM Configuration
- Execution
- Deploying The Function To AWS
… and much more. Author points out that also worth exploring is the GraalVM to compile a Scala function to a native executable and then invoke it with the custom AWS Lambda runtime. The startup time for a GraalVM native Scala app should be in the milliseconds. Plenty of detailed screen grabs and all code explained. Great article!
[Read More]