SAPonAWS: Create a Amazon Web Services EC2 instance for SAP
This is part of blogs series for creating your own SAP lab on Amazon Web Services cloud.
In this blog I am attempting to help create a AWS EC2 instance ONLY. Installation of SAP HANA and ABAP will be covered in other blogs.
Short Introduction to AWS
Amazon Web Services (AWS) is a suite of on-demand IT services provided over the Internet by Amazon.com. The Amazon Elastic Compute Cloud (EC2) is an IT infrastructure platform that provides on-demand access to a virtual Linux/UNIX and Windows servers, storage and networking.With AWS you only pay for the services you use when you are using them.
Perquisites – Sign up for an AWS account and activate your account for AWS EC2
Using your AWS account and password log into the AWS Management Console
Once you login in aws you will find a lot of aws services, find the Compute Section on the upper left Conner.
Open the EC2 Dashboard
EC2 dashboard has loads of info about your EC2 instances. But there will 0 Running Instances with a new account.
Please note the AWS Region as shown in the Right top Conner.
You can select any of the available region, EC2 instance will be created in the selected region only.
To create a EC2 instance Select “Launch Instance” and follow the wizard steps 1-7 .
Step 1: Choose an Amazon Machine Image (AMI)
An AMI is a template that contains the software configuration (operating system, application server, and applications) required to launch your instance.
select option – SUSE Linux Enterprise Server 12 SP1 (HVM), SSD Volume Type – ami-b7b4fedd
Step 2: Choose an Instance Type
Instances are virtual servers that can run applications. They have varying combinations of CPU, memory, storage, and networking capacity,
Select a instance of the size as per your needs
– For ABAP instance select check SAP note # 1656099 for the latest SAPS ratings of the different Amazon EC2 instance types.
– General purpose m4.xlarge with 4 vCPU and 16 GB RAM (For HANA express edition)
Step 3: Configure Instance Details
Leave these setting to default but dont leave them blank if they are empty.
Settings for VPC and IAM role are critical allowing connection in and out from your EC2 instance.
Step 4: Add Storage
A default root volume will already be there with 10 GB space.
Beginners can use this root volume for installation by increasing the size as per your needs. For HANA express edition another make this size to 30 GB.
If you chose to add another disk,then as a separate step you will have to format the disk and mount it from within the EC2 instance.
Step 5: Tag Instance
A tag consists of a case-sensitive key-value pair used to organize EC2 instances. This setting can be ignored for beginners.
Step6: Configure Security Group
A security group is a set of firewall rules that control the traffic for your instance. On this page, you can add rules to allow specific traffic to reach your instance.
Select below option
Type – All traffic
Protocol – All
Port Range – 0 – 65535
Source – Anywhere 0.0.0.0/0
Step 7: Review Instance Launch
Please review your instance launch details. You can go back to edit changes for each section.
Click Launch to see the below popup.
Select – Create a new Key Pair and give any name.
Click “Download Key Pair “. The .pem Key is saved on your desktop.
Click “Launch Instances” and your first EC2 instances is ready to be used.
Your EC2 instance should be ready to use in few mins. Check your “EC2 dashboard” it will show “1 Running Instances” .
Click on that to see the list of instances. Note down the “Public DNS” of your instancce show above. This host name used to ssh into your instances
Login to the EC2 instance from PuTTY
Convert the downloaded .pem key to .ppk file with puTTYgen
In PuTTY prove the “Public DNS” as <host name> and use the converted .ppk for authentication.
PuTYY will prompt login user, give “ec2-user”
Configure network to set permanent host name.
By default when Amazon EC2 Linux instances are stopped/started a new hostname is generated. This behavior is not appropriate for an SAP system and can be disabled by following the steps below:
1) Start yast
2) Navigate to Network Devices -> Network Settings (press enter)
3) Select Hostname/DNS in the menu
4) Change the values of the Hostname and Domain Name fields as required
5) Uncheck “Change Hostname via DHCP”
6) F10 (to save)
7) F9 (to exit)
Now you have a running Linux EC2 instance on which SAP ABAP, JAVA or HANA instance can be installed. I will cover these installation as separate blogs individually.
I can give a brief understand of aws concepts if needed. Please let me know in comments if this has been helpful for you to begin using aws.
You can deploy SAP HANA, AS ABAP, S/4HANA, BW/4HANA and many other SAP products on AWS or Microsoft Azure with just a few clicks in SAP Cloud Appliances Library
For more information see SAP Cloud Appliance Library (CAL)
Thats a great option to quickly start a new SAP instance but it does not give you all possible installation options. More over when you are migrating your existing landscape , you will have to create you own customized EC2 and migrate your existing system onto it.
SAP Cloud Appliance Library (CAL) is good option for setting up crash and burn sandboxs with no necessary fine tuning needed.
Yes, the systems available in SAP CAL are pre-installed and pre-configured that might be a challenge in a custom scenario. In any case I would recommend first to check what you can get in SAP CAL for minutes to hours before starting building a system from scratch that may take days to weeks.
when will you release your blog post to install HANA Express on this aws ec2 instance? We got some errors when installing the binary package of hana express to a SLES ec2 instance.
Thanks for following my blog.
Yes, even I had a issue with installing HANA express.
Can you try installing a libray with below command.
yast2 -i libltdl7
Let me know if that worked or are you getting some other error.
does your EC2 instance allow spot pricing? i noticed that sometimes, step 3 setup may include private IP addresses which effectively prevent reassigning IP addresses and thus not allowing anyone from reusing the same instance from a saved AMI.
That's interesting , I would never think of using SAP on spot instance. Spot instance can be taken away from your anytime the price is about your bid.
Well about spinning instance from AMI , you can run a script to
1. configure generic host names at the start of EC2
2. adjusting profile name and user variable accordingly
If you need specific hostname, you can pass two types of user data to Amazon EC2 at startup: shell scripts and
cloud-initdirectives. You can also pass this data into the launch wizard as plain text, as a file (this is useful for launching instances via the command line tools), or as base64-encoded text (for API calls).
Refer to link below