EDUCAÇÃO E TECNOLOGIA

SAP Kyma vs. AWS Lambda

In this article I’ll introduce SAP Kyma and compare it to AWS Lambda, Amazon’s managed serverless runtime platform.

What is SAP Kyma?

SAP Kyma is an open source project, which is an extension of the world’s most popular container orchestrator—Kubernetes. It comprises several open source tools, integrated into a unified platform. The goal of Kyma is to provide a unified runtime environment with everything developers need to manage microservices applications in an enterprise environment.

The open source project was initiated by SAP, and has been donated to the open source community. Its overarching goal is to bridge the gap between microservices applications and legacy monolithic applications which are still used by many organizations.

It includes open source projects that address:

  • Service consumption
  • Authentication
  • Logging, monitoring, and alerting
  • Service catalog and service discovery
  • Connectors enabling easy integration with business applications
  • Ability to connect any application and provide secure access to its APIs from within a Kubernetes cluster 
  • Running serverless functions
  • Managing an event flow that can trigger serverless functions or containers

SAP Kyma Benefits

Running Kubernetes with Kyma allows you to:

  • Get a fully managed Kubernetes runtime
  • Run serverless functions, microservices, and custom Docker images in one runtime
  • Leverage open standards to allow easy ramp up for developers
  • Leverage Kyma’s built-in API microgateway, event bus, and service mesh

Due to these capabilities, Kayma provides an all-in-one solution for cloud-native development. Another key advantage is that Kayma complies with SAP’s operational and release processes and standards, as well as best practices and tooling from the leading cloud providers. 

SAP also provides the Central Management Plane service, which can be used together with the Kyma runtime. The Central Management Plane is part of the SAP Cloud Platform, and can be launched within any Global account. It provides out-of-the-box connectivity to SAP S/4HANA Cloud, SAP Commerce Cloud, SAP Field Service Management, and SAP Cloud for Customers. Application connectors are available to cover additional SAP products.

What is AWS Lambda?

AWS Lambda is a cloud service that lets you run code without managing any of the underlying infrastructure. Lambda lets you write functions, which are simple pieces of code in a variety of programming languages, and run them seamlessly on AWS resources. 

Amazon takes care of provisioning the appropriate compute resources, including servers and operating systems, ensuring the resources have enough capacity to run your function, and automatically scaling up and down as needed. 

Lambda runs serverless functions only when they are needed—typically they are triggered by events sent by other services. You can also run serverless functions using the Lambda API. AWS pricing for Lambda depends on the number of function instances you run, the invocation time, and the actual compute and memory resources used. 

AWS Lambda Benefits

Lambda is a convenient, self managed development environment which is appropriate for many use cases. It provides the following key benefits:

  • No servers to manage—automatically runs code on highly available infrastructure distributed across multiple Amazon availability zones (AZs). Infrastructure is fully taken care of by Amazon, including operating system updates and maintenance. 
  • Built-in logging and monitoring—integrates with Amazon services like CloudWatch and CloudTrail, which provide visibility into server function activity.
  • Continuous scaling—processes each event individually, ensuring each serverless function is allocated exactly the resources it needs to serve current loads.
  • Saves time for developers—simplifies the development process, only requiring developers to write code and eliminating the need to plan and manage infrastructure.
  • Pre-integrated cloud services—enables application modernization, by leveraging Amazon services that let you classify images, convert speech to text, analyze video content, perform big data analytics, and more.
  • Amazon ecosystem and resources—provides ready-made serverless applications in the Serverless Application Repository, offers the Serverless Application Model as a simple framework for building serverless systems, and integrates with several development environments. 

SAP Kyma vs AWS Lambda for Serverless Workloads

SAP Kyma is a broad solution that lets you run containerized workloads, serverless workloads, and has additional capabilities like service mesh. AWS Lambda is a service focused only on running serverless functions. Let’s compare Kyma to Lambda for the specific use case of serverless applications.

SAP Kyma AWS Lambda
Infrastructure Can run on any infrastructure—on-premises or in any public cloud. Specific to AWS cloud.
Cost Open source—can be used at no cost. Pay-per-use pricing based on function invocation time and CPU/memory resources used.
Language support Supports any programming languages for serverless functions. Supports Java, Go, PowerShell, Node.js, C#, Python, and Ruby. You can use a Runtime API to run functions in additional languages.
Scale Depends on the resources allocated to your Kubernetes cluster, and other workloads running on the cluster. Unlimited.
Hybrid workloads Supports hybrid workloads such as containers and serverless functions in one operating environment. Only supports serverless, but integrates with services like Amazon Elastic Kubernetes Service (EKS) Elastic Container Service (ECS).

Conclusion

In this article I explained the basics of SAP Kyma, an open source project that extends the Kubernetes container orchestrator, and AWS Lambda, a cloud service that allows you to run serverless functions.

In a sense, the two platforms are not really comparable, because Kyma is a self-managed infrastructure while AWS Lambda is a fully managed serverless. Kyma lets you run serverless functions, but is not fully “serverless” because you still need to manage the underlying Kubernetes cluster. However, it has major advantages over Lambda, including the fact that it is free and open source, and its ability to run hybrid workloads and manage them using advanced capabilities such as service mesh.

In the end, your choice of serverless platform will depend on your needs and current technology ecosystem. If you are heavily invested into the AWS ecosystem, Lambda is a natural choice. If you are already working with Kyma, running serverless functions within your clusters is easy. If, however, you are just starting with serverless development, you’ll need to consider the ease of use and seamless scalability of Lambda, compared to the flexibility but added complexity of SAP Kyma.