How to connect CPI DS with AWS Transfer for SFTP/S3 Buckets via public key authentication
Following blog post is describing steps to establish connectivity between CPI DS and AWS SFTP.
In current example we are going to create a File Format data store, which will be connected to AWS SFTP via ssh key, sample project task which will be pulling data from file, stored on SFTP server, map data and save into database table.
- CPI DS is up and running, including DS Agent service running on Windows.
- S3 Buckets are enabled on AWS and we have read/write access into buckets.
- AWS Transfer for SFTP service is enabled in AWS Console on top of S3 Bucket Service.
- Hana Database is running and connected from CPI DS.
Generate SSH Keys from DS Agent machine.
Open Command line and navigate to C:\ProgramData\SAP\DataServicesAgent\conf\keys\sftp
Enter command ssh-keygen.
Specify full path to save keys.
As a result 2 files should be created under C:\ProgramData\SAP\DataServicesAgent\conf\keys\sftp
Where first is a private key and second is a public key.
Upload SSH Key into AWS Transfer for SFTP.
Login to AWS Console.
Navigate to AWS Transfer for SFTP Service.
Open user which will be used for connectivity with CPI DS. Add new ssh key.
Open public key file content, copy content and add new ssh key via AWS Console. Save.
Create Datastore in CPI DS.
Go to CPI DS and create new Datastore with the following settings.
Create new file structure.
Create DB Datastore
And import table to map data into.
Create Project Task to retrieve data from SFTP, map it and save into HANA DB.
Run task to test connectivity and make sure records from file located in SFTP have been replicate to HANA DB Table.
Check the database table. Make sure records being created.
Following blog post illustrates how to configure connectivity between CPI DS and SFTP via public key. This guide can be used specifically for Amazon Web Services (AWS Transfer for SFTP).