Improve supply chain resiliency and optimize costs using AWS Supply Chain with SAP S/4HANA


Managing modern supply chains comes with immense challenges such as global volatility, transportation disruptions, and unforeseen changes in customer demand, all of which require supply chain agility, scalability, and innovation to address. AWS Supply Chain offers a compelling option for customers to help overcome these challenges and transform their supply chain operations.

AWS Supply Chain provides purpose-built capabilities for supply chain management such as demand forecasting, inventory management across sites, and supplier planning. Created with integration in mind, AWS Supply Chain comes with the ability to connect to your existing enterprise resource planning (ERP) and supply chain management systems without re-platforming, upfront licensing fees, or long-term commitments.

Two of the most popular ERP software solutions in use by enterprises today are SAP ECC and SAP S/4HANA. With more than fifteen years of supporting SAP workloads, AWS is the choice of thousands of customers who want to modernize their SAP workloads and innovate faster. In recent years, many customers are choosing RISE with SAP on AWS to accelerate their business transformation. AWS Supply Chain is compatible both with the on-premises versions of SAP ECC and SAP S/4HANA, as well as SAP S/4HANA Cloud through RISE with SAP. With AWS Supply Chain, you can take advantage of your existing investment in SAP while at the same time accelerating innovation to better address your company’s supply chain challenges.

In this blog, we will walk you through the connectivity options, configuration considerations, and best practices for integrating your SAP S/4HANA system with the AWS Supply Chain.

What is the AWS Supply Chain?

AWS Supply Chain works with your existing solutions, such as enterprise resource planning (ERP) and supply chain management systems. Using AWS Supply Chain, you can connect and extract your inventory, supply, and demand-related data from existing ERP or supply chain systems into one unified AWS Supply Chain data model.

Further, AWS Supply Chain contextualizes your data in a real-time visual map and highlights current inventory selection and quantity as well as the health of inventory at each location, surfacing issues such as inventory that is at high risk for stockout. With AWS Supply Chain, you receive automated insights regarding your most urgent inventory issues, and you can set up watchlists to alert you proactively when a potential supply chain disruption arises.

AWS Supply Chain enables you to take the right action quickly based on suggested options and recommendations on the best course of action (for example, a suggested rebalancing decision between warehouses to avoid stockout). You can also reduce errors and improve efficiency by using the built-in contextual collaboration capabilities to collaborate across teams and resolve issues faster.

In addition, AWS Supply Chain helps you deliver on customer promises with more accurate demand forecasts powered by machine learning.

High level Architecture & Pre-requisites for AWS Supply chain connectivity with SAP S/4HANA

In this section, we will discuss the best practices for the connection and configuration of your SAP S/4HANA system prior to data ingestion into the AWS Supply Chain Data Lake.

Below is a high-level reference architecture of the connectivity and data flow:

AWS Supply Chain connectivity with SAP

       Figure 1 –  AWS Supply Chain connectivity with SAP

This reference architecture shows the SAP S/4 HANA system, the AWS Supply Chain Connector powered by Amazon AppFlow, and an AWS Supply Chain instance all in one AWS region. Keep in mind that your SAP system can be in a different region from your AWS Supply Chain instance, can be hosted on-premises or hosted using RISE with SAP on AWS, or with another cloud provider. For such connectivity, customer can use Amazon AppFlow service in their AWS account to connect with SAP system hosted under SAP RISE account or on-premises. Under the hood, AWS Supply Chain communicates with Amazon AppFlow to extract data using Operational Data Provisioning (ODP) with SAP DataSources that are exposed as Open Data Protocol (OData) services.

There are three main activities that are required to visualize ML-powered forecasting, demand planning and insights in the AWS Supply Chain based on the data from your SAP system.

1.Amazon AppFlow connectivity to the SAP S/4HANA system.

2.Prepare datasets in SAP S/4HANA and make those available as an ODATA service.

3.AWS Supply Chain connectivity to the SAP S/4HANA system and data ingestion into the AWS Supply Chain using an in-built connector.

Let’s have a look at these steps.

Amazon AppFlow connectivity to the SAP S/4HANA system

To configure Amazon AppFlow connectivity to the SAP S/4HANA system for Operational Data Provisioning (ODP)-based data extraction, start with these step-by-step directions in the Amazon AppFlow documentation: SAP OData connector for Amazon AppFlow

Blog: SAP ODP based Change Data Capture with Amazon AppFlow SAP OData Connector

For added data security in your mission-critical production SAP systems, we strongly recommend that you avoid transmitting it via the public internet. To accomplish this, set up connectivity for data transfer using AWS PrivateLink, as described in this blog. This AWS CloudFormation template can help by automatically setting up AWS PrivateLink infrastructure for secure connections to your SAP system.

Prepare datasets in SAP S/4HANA and make those available as an ODATA service

Once the connectivity between Amazon AppFlow and your SAP system has been configured, you’re ready to set up your SAP S/4HANA system to transfer the data required by the AWS Supply Chain. As part of this configuration, you will create and activate SAP DataSources if they don’t already exist; please refer to a documentation for the detailed, up-to-date list of these DataSources. In the section of the documentation entitled SAP source tables, please note that “SAP data sources” whose names begin with the letter “Z” are identified as a “Table” in the list; those starting with “ZV” are SAP views; and those starting with “ZQ” are SAP queries. The standard DataSources referred to in the documentation that start with “0BP*” and “2LIS*” involve some additional considerations, and we will discuss that in “Data Ingestion from SAP S/4HANA” below.
Pay close attention to the columns in the documentation that refer to whether the data extraction type is “delta” or “full” along with whether the data type is “Master data” or “Transactional data” as this affects which transactions and which selection options you will use during configuration.

Once you are familiar with the SAP Data Source section, walk through the setup of these data sources as described in the AWS Supply Chain workshop section titled Data Ingestion from SAP S/4HANA.

AWS Supply Chain connectivity to SAP S/4HANA and data ingestion in AWS Supply Chain using an in-built connector

Once you have created and activated the DataSources in SAP as well as defined the corresponding SAP Gateway service, you are ready to connect your AWS Supply Chain instance with your SAP S/4AHANA system to begin the initial data extraction into the AWS Supply Chain data lake.

If you have not done so already, create an AWS Supply Chain instance in your AWS management console; simply search for AWS Supply Chain to go to the console for the service and click the “create instance” button in your chosen AWS Region. AWS Supply Chain users can be managed with the associated IAM Identity Center service. Refer to the enabling IAM Identity Center section in the documentation.

Your AWS Supply Chain instance comes with out-of-the-box connectors to SAP S/4HANA and SAP ECC systems along with other data sources such as Amazon Simple Storage Service (Amazon S3) and Electronic Data Interchange (EDI).

To create a connection, log in to your AWS Supply Chain instance and navigate to Data Lake → Connections in the left-hand pane.

AWS Supply Chain data lake options

Figure 2 – AWS Supply Chain data lake options

Click the “New Data Connection” button and select SAP S/4HANA. Click the “Next” button.

AWS Supply Chain connection options

Figure 3 -AWS Supply Chain connection options

In the next screen provide connection details to your SAP system. As stated earlier, AWS supply chain uses Amazon AppFlow behind the scenes to extract data from your SAP S/4HANA system.You will find the application host URL and the AWS PrivateLink service name from your configuration of the Amazon AppFlow connection to the SAP S/4HANA system as described earlier.

AWS Supply Chain to SAP connection details

Figure 4 -AWS Supply Chain to SAP connection details

Once connected, there is no need to do additional mapping. You can click through the rest of the wizard, and data ingestion will begin automatically. AWS Supply Chain automatically creates & run data flows to extract data from SAP system.

Entity groups and Dataflows

Figure 5 -Entity groups and Dataflows

At this stage your AWS Supply Chain data lake is populated with the data sets (transactional and non-transactional) from the DataSources from your SAP system which have been exposed using OData services. You can monitor data ingestion by navigating to Connections -> Data flows -> All data flows.

AWS Supply Chain Data Lake formation

Figure 6 -AWS Supply Chain Data Lake formation

Data mapping in AWS Supply Chain

AWS Supply Chain provides capability for users to see and modify data field mapping from SAP source to AWS Supply Chain target Data lake. To see this mapping, under Data Lake Connections, select your SAP connection and expand Entity Groups. Click on more options and click on Manage Recipe for entity which you want to see the data field mappings, for example Purchase Order – Inbound Order Line. You will be able to see SAP datasource fields are extracted and mapped to AWS Supply Chain data lake fields. For example, SAP data source 2LIS_02_ITM field EBELN is mapped to order_id field of AWS Supply Chain Purchase Order Inbound Order Line. You can click on Recipe Actions to download field mappings or upload mapping as per your requirement.

AWS Supply Chain SAP datasource data field mapping

Figure 7 – AWS Supply Chain SAP datasource data field mapping

Data Visualization in AWS Supply Chain

Once the data ingestion process is complete, the AWS Supply Chain Application uses machine learning for its data transformation and planning functions. Companies can easily connect to data across all of their supply chain systems with faster, easier data association with prebuilt connectors for common ERP systems such as SAP S/4HANA. This can be done without re-platforming or moving to a new system; AWS Supply Chain acts as an overlay over these systems and adds value on top of them. Customers can combine SAP data with non-SAP data sources. For example, customer can visualize inventory status across different locations for data from different sources as shown in Figure – 8 – AWS Supply Chain Inventory Visibility Network Map.

AWS Supply Chain Inventory Visibility Network Map

Figure 8 – AWS Supply Chain Inventory Visibility Network Map

Important considerations and troubleshooting

In SAP, while creating the SAP data source, make sure the data source name must matches exactly with the SAP data source name in the documentation list.

As stated earlier, the SAP data sources are defined as ODATA services. Make sure the ODATA service is activated and the service test return value is 200 (OK) in transaction /n/IWFND/MAINT_SERVICE. For further ODATA service-related errors, check /n/IWFND/ERROR_LOG.

AWS Supply Chain automatically creates 53 flows using Amazon AppFlow to extract data from the SAP S/4HANA system. Flow names include the AWS Supply Chain instance ID and the SAP S/4HANA data source name.

You can check the flow status for each flow by logging into Amazon AppFlow. For common error codes related to AppFlow, refer to the Common Errors documentation. Also, Amazon CloudWatch metrics are available for each flow and are a good starting point for troubleshooting. You can also refer to CloudTrail logs for the record of actions taken by a user, role, or AWS service in Amazon AppFlow.

There are two types of S3 buckets that will be created: one by Amazon AppFlow, referred to as the destination bucket, to store extracted data, which will be used by AWS Supply Chain for data ingestion into AWS Supply Chain Instance. Another one by AWS Supply Chain connection for each entity type and type of ingestion (Replace, Update, Delete).

If you face an AWS Supply Chain to SAP S/4HANA connectivity issue, make sure that the KMS key policy is updated with the correct AWS Supply Chain instance ID that it has “ListGrants” permissions.

Refer to documentation for more details.

If you see errors in the extracted data in the AWS Supply Chain, you can get more details about them by exporting the data (from the Amazon AppFlow destination bucket for that particular flow) to a CSV file and inspecting the extracted data for potential problems, including null fields and duplicate rows, which can lead to failures in ASC data ingestion.

In the AWS Supply Chain, you can get more details about the data ingestion problem by going to the Manage Recipe area of the entity with an error.

Troubleshooting data ingestion issues in AWS Supply Chain

Figure 9 – Troubleshooting data ingestion issues in AWS Supply Chain

For further assistance with troubleshooting AWS Supply Chain issues, you can open a case with the AWS Supply Chain team to get administrative support for AWS Supply Chain.


AWS Supply Chain is a pay-as-you-go cloud supply chain application offering a data lake, insights, and demand planning capabilities. Pay only for what you use. There are no required upfront licensing fees or long-term contracts. Please refer to the pricing section of the AWS Supply Chain documentation for detailed information.


With SAP S/4 HANA integration into AWS Supply Chain, you can maximize your responsiveness to demand volatility and supply disruptions, thereby increasing the resilience of your supply chain. You quickly gain visibility across your supply chain data, which updates in near-real-time because the system recalculates when it receives new data. You can make more informed decisions with ML-powered, actionable insights and recommendations. You can resolve issues quickly with built-in contextual chat and messaging, with everyone working together in the same application with the same information. You can mitigate risks to improve the customer experience while lowering costs. As shown in the configuration, all this is achieved with a few clicks using a purpose-built connector with the SAP S/4 HANA system.

To get started, check out the AWS Supply Chain product and additional resources:

AWS Supply Chain

Demos, Videos & Blogs