Technical Articles
Deploy SAP Cloud Connector on AWS using SAP Business Application Studio
Most readers would know that setting up SAP Cloud Connector (SAPCC) is the first step to connect your SAP system to a wide range of innovations in the SAP Cloud Platform (SCP). In this blog post, I am going to show how to deploy this from SAP Business Application Studio (BAS) using AWS Cloud Development Kit (CDK).
Let’s get started.
Sign up for a trial in SAP Cloud Platform
In case you have not heard, SAP announced the extension of SAP Cloud Platform (SCP) trial to 12 months. I am sure many SAP developers would share my excitement and would be eager to start experimenting. All you need to do is access the free trial here and sign-in using your S-user ID.
Here I am selecting the Europe (Frankfurt) – AWS region.
That’s how simple it is! I’ve got access to my 365 days trial.
Deploy SAP Cloud Connector using SAP Business Application Studio
Let’s add SAP Business Application Studio subscription to subaccount. Go to Subscriptions and search for business applications.
Click on the application and create a Dev Space
We are going to call this “saponaws” and click create dev space.
Click on Terminal and then select New Terminal.
Let’s run a couple of commands to see what’s under the hood. I ran lsblk, lscpu, lsmem and uname and it showed a powerful machine under the hood with 8 vCPU and 32GiB of RAM and 600 GB of disk. This is certainly a more powerful machine than my laptop!
Also, the operating system is running Debian, which is a really awesome open source project and I am delighted SAP is using it.
For the latest version of the AWS CLI, use the following command block:
$ cd /home/user
$ mkdir -p /home/user/local/bin /home/user/local/aws-cli
$ curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip”
$ unzip awscliv2.zip
$ ./aws/install -i /home/user/local/aws-cli -b /home/user/local/bin
$ export PATH=$PATH:/home/user/local/bin
$ aws configure
AWS Access Key ID [********************]:
AWS Secret Access Key [********************]:
Default region name [us-east-2]:
Default output format [None]:
Once this is configured, we can start deploying the SAP cloud connector (SAPCC).
Git and node.js is already installed by default in BAS, so I can just go ahead and clone the repo
$ git clone https://github.com/aws-samples/aws-cdk-for-sap-examples.git
$ cd aws-cdk-for-sap-examples/sap-cloud-connector
$ npm install
Then update /lib/AppConfig with the AWS account details
$ cdk synth
$ cdk deploy
Once the deployment finish, you can access it using the private IP address with default port number of 8443.
If you wish to login to the operating system you can use AWS Session manager in the AWS console. Just click the Connect button on the right hand side.
Select the Session Manager tab and click connect.
Clean up
Cleaning up the infrastructure is easy, just run the cdk destroy command.
Conclusion
This was a very pleasant experience for me, it’s a great IDE that allows me to deploy my infrastructure and my applications. This is just a glimpse of what BAS can do for your infrastructure and application development, and I will follow up with more blog on this topic, so stay tune to the SAP blog.
I hope you that you find this interesting and have as much fun as I did. Download the code and give it a try. If you have questions, feel free to reach out in the comment session. Start building today and have fun!
Hi Patrick,
We have deployed the SCC to the ECS not EC2 and create backup script to get copy of config files but now, with the new SCC version (2.13.0) current setup is having some issues and not working. We are having good oportunities to keep our infrastructure as code at ECS but it has also downsides like we cannot access the ljs_logs when the service is not working. When you compare with EC2 vs ECS deployment of SCC, what is your thoughts about it, this is a kind of unique usage of SCC and I really want to learn your opinions about this.
Kind regards,
kivanc
Hello Kivanc,
Thank your for your comment.
I think it's a great idea to containerize SCC using Amazon ECS! Rather than a purely technical decision, I think what your team is comfortable with is an essential factor too. Regarding ljs_logs, perhaps you can configure your container instances to send log information to CloudWatch Logs by following the steps in this guide.
Patrick
Hi Patrick,
Thank you for your response, I don't remember the exact date but a couple of weeks after I posted the question here, I have found out the way of fetching the logs with exec in docker. It might help someonelse, here the referance : https://aws.amazon.com/blogs/containers/new-using-amazon-ecs-exec-access-your-containers-fargate-ec2/
p.s. sending ljs_logs to the CloudWatch Logs also nice idea but in our case, service was failing before sending the logs.
Kind regards,
Kivanc
I am in the same situation in the current project. I can't register the sub-account in the cloud connector because I can't I have to use a proxy or enable the firewall. do you know in aws which product is needed to manage the firewall or to define a proxy in aws.