Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin for the Cloud

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Kotlin for the Cloud

Avatar for jangolano

jangolano

June 29, 2025

Other Decks in Programming

Transcript

  1. 2 | LEAN TECHNIQUES • Why Kotlin • Machine Setup

    • Servless API • Fargate (Docker) API • Machine Learning with AWS Serverless Agenda
  2. 3 | LEAN TECHNIQUES Why Kotlin • Statically Typed Language

    • Runs on the JVM, which is supported by all major cloud providers. • Less boilerplate code than Java • The Spring framework supports Kotlin as a first class language. • Infrastructure as code providers support java, and therefore support Kotlin as a language for defining infrastructure. • Cloud providers either support Kotlin or Java as and SDK language. You can use the Java SDK from kotlin. • Kotlin supports co-routines (non-blocking asynchronous programming)
  3. 4 | LEAN TECHNIQUES Tools • AWS CLI • IntelliJ

    • Java 21 • NodeJs 20 • AWS CDK
  4. 5 | LEAN TECHNIQUES CDK Concepts Application Stack Stack Construct

    Construct Construct Construct Construct Construct Construct Construct Construct Construct Construct Construct
  5. 6 | LEAN TECHNIQUES Most used commands • cdk synth

    - Convert CDK code to cloudformation • cdk diff - Show you what is different from what is in the account. • cdk deploy - Deploy your infrastructure to your account. CDK Commands
  6. 8 | LEAN TECHNIQUES Co-routines • Fire and forget •

    Return 1 results • Gather multiple results
  7. Serverless API • What we are going to build: Infrastructure

    using AWS CDK API Gateway Lambda Application Code Lambda • Final project can be found here: https://github.com/jangolano/lambda 10 | LEAN TECHNIQUES Snap Start serializes JVM based lambdas to disk when promoting a version. This reduces code start time for java based lambdas, therefore making the API faster.
  8. 12 | LEAN TECHNIQUES Fargate Spring API • What we

    are going to build: Infrastructure using AWS CDK ECS Service ECS Task Application Load Balancer Application Code Spring Boot Application • Final project can be found here: https://github.com/jangolano/fargate-api
  9. 14 | LEAN TECHNIQUES AWS Machine Learning Services with AWS

    Kotlin SDK • Download the sample project here: https://github.com/ jangolano/aws-ml-services • AWS Reckognition - Object Detection • AWS Comprehend - Sentiment Analysis • AWS Transcribe - Used to transcribe audio into text
  10. Resources The following resources can be used to create applications

    and infrastructure in Kotlin. 15 | LEAN TECHNIQUES CDK https:// docs.aws.amazon.com/ cdk/api/v2/java/ Kotlin Language https://kotlinlang.org/ Kotlin SDK for AWS https:// docs.aws.amazon.com/ sdk-for-kotlin/latest/ developer-guide/ home.html AWS Console https:// console.aws.amazon.com