SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Use Redis in SAP BTP, Kyma Runtime to Store and Retrieve Data

Deploy Redis and configure two Serverless Functions to cache and retrieve data from the Redis instance within SAP BTP, Kyma runtime.

Overview

🎓 intermediate 30 min. SAP BTP Kyma RuntimeIntermediateCloudSAP Business Technology Platform

You will learn

  • โœ”How to deploy a microservice using Kyma dashboard
  • โœ”How to deploy Functions using Kyma dashboard
  • โœ”How to create APIRules
  • โœ”How APIs and Events are used.
Unknown U Unknown December 3, 2025
Created by April 24, 2024
Contributors

Prerequisites

Steps

Intro

This sample provides a Redis deployment and two Serverless Functions that interact with it. The cache-order Function is set to subscribe to the order.created event provided by the commerce mock application. Once triggered, the Function performs an API call to the commerce mock to obtain additional details regarding the order and then cache the information into Redis. The get-order Function, exposed as an API, is used to retrieve the order details from the Redis cache.


Step 1 Clone the Git repository
โ€”

  1. Go to the kyma-runtime-extension-samples repository. This repository contains a collection of Kyma sample applications which will be used during the tutorial.

  2. Use the green Code button to choose one of the options to download the code locally, or simply run the following command using your CLI at your desired folder location:

    Shell/Bash
    git clone https://github.com/SAP-samples/kyma-runtime-extension-samples
Step 2 Add the Serverless, Eventing and NATS modules in SAP BTP, Kyma runtime
+
Step 3 Choose a backend for Kyma Eventing
+
Step 4 Deploy Redis
+
Step 5 Deploy Functions
+
Step 6 Expose a Function
+
Step 7 Add event subscription to the Function
+
Step 8 Obtain the API URL for the Function
+
Step 9 Adjust Function variable
+
Step 10 Test event consumption
+
Step 11 Review output in the Function logs
+
Step 12 Get output from the Function APIRule
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 12
1. Clone the Git repository 2. Add the Serverless, Eventing and NATS modules in SAP BTP, Kyma runtime 3. Choose a backend for Kyma Eventing 4. Deploy Redis 5. Deploy Functions 6. Expose a Function 7. Add event subscription to the Function 8. Obtain the API URL for the Function 9. Adjust Function variable 10. Test event consumption 11. Review output in the Function logs 12. Get output from the Function APIRule

Learn more →