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

JConf Peru 2024 - Starting up faster with AWS L...

JConf Peru 2024 - Starting up faster with AWS Lambda SnapStart

Ytalo Elías Borja Mori
Could Application Architect at AWS Peru

At re:Invent 2022, AWS announced Lambda SnapStart for Java functions. This feature enables builders to achieve up to 10x faster function startup performance for Java functions, at no additional cost, and typically with minimal or no code changes.

Carlos Zela Bueno

December 09, 2024
Tweet

More Decks by Carlos Zela Bueno

Other Decks in Programming

Transcript

  1. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Starting up faster with AWS Lambda SnapStart J C O N F P E R U 2 0 2 4 Ytalo Elias Borja Mori Cloud Application Architect AWS
  2. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Reminder! Time 1 Initialization Execution 2 Initialization Execution 3 Execution 4 Execution Cold start Warm start Env. #1 Env. #2 Image from (4)
  3. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Lambda SnapStart • Provide as low as sub-second startup performance • Lambda initializes your function when you publish a function version Image from (1)
  4. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Lifecycle Image from (2)
  5. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. When to use it • To address the latency variability introduced by one-time initialization code • SnapStart works best when used with function invocations at scale. • Lambda managed runtimes: Java 11 and later, Python 3.12 and later, .NET 8 and later Latency-sensitive APIs and user flows Latency-sensitive data processing workflows
  6. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Compatibility considerations • Uniqueness • Network connections • Temporary data Image from (3)
  7. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Let‘s get started! https://catalog.workshops.aws/java-on- aws-lambda/en-US
  8. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Resources 1. https://aws.amazon.com/blogs/compute/starting-up-faster- with-aws-lambda-snapstart/ 2. https://aws.amazon.com/blogs/compute/reducing-java-cold- starts-on-aws-lambda-functions-with-snapstart/ 3. https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html 4. https://serverlessland.com/reinvent2022/svs310
  9. © 2022, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Thank you! Please complete the session survey in the mobile app Ytalo Elias Borja Mori [email protected] Your feedback is important: https://feedback.aws.amazon.com/?ea=ytaloeli&fn=Ytalo%20Elias&ln=Borja%20Mori