The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Deployment steps using AWS CLI

Step 1. Prepare Storage Configuration for SAP HANA

Use the editor of your choice to create a .json file that contains block device mapping details similar to the following example, and save your file in a temporary directory. The example shows the block device mapping details for the x1.32xlarge instance type with io1 volumes for HANA data and log. Change the details depending on instance and storage type that you intend to use for your deployment. For more information about the storage details for different instance types, see the Planning the deployment section of the SAP HANA on AWS Quick Start guide.

[ {"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":50,"VolumeType":"gp2","DeleteOnTermination":false}}, {"DeviceName":"/dev/sdb","Ebs":{"VolumeSize":800,"VolumeType":"io1","Iops":3000,"Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sdc","Ebs":{"VolumeSize":800,"VolumeType":"io1","Iops":3000,"Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sdd","Ebs":{"VolumeSize":800,"VolumeType":"io1","Iops":3000,"Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sde","Ebs":{"VolumeSize":1024,"VolumeType":"gp2","Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sdf","Ebs":{"VolumeSize":4096,"VolumeType":"st1","Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sdh","Ebs":{"VolumeSize":525,"VolumeType":"io1","Iops":2000,"Encrypted":true,"DeleteOnTermination":false}}, {"DeviceName":"/dev/sdr","Ebs":{"VolumeSize":50,"VolumeType":"gp2","Encrypted":true,"DeleteOnTermination":false}} ]


If the DeleteOnTermination flag is set to false, Amazon EBS volumes are not deleted when you terminate your Amazon EC2 instance. This helps preserve your data from accidental termination of your Amazon EC2 instance. When you terminate the instance, you need to manually delete the Amazon EBS volumes that are associated with the terminated instance to stop incurring storage cost.

See Appendix A for more examples of block device mappings for other Amazon EC2 instance types and Amazon EBS volume types.


If you plan to deploy scale-out workloads, you don’t have to include Amazon EBS volumes for SAP HANA shared and backup volumes. You can use Amazon EFS and Network File System (NFS) to mount the SAP HANA shared and backup volumes to your master and worker nodes.

Step 2. Launch the Amazon EC2 instance

Use AWS CLI to launch the Amazon EC2 instance for SAP HANA, including Amazon EBS storage, in the VPC in your target AWS Region by using the information you gathered during the preparation steps; for example:


Be sure to enter the command on a single line.

$ aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type x1.32xlarge --region us-west-2 --key-name=my_key --security-group-ids sg-xxxxxxxx --subnet-id subnet-xxxxxxxx --placement GroupName=My-PlacementGroup,Tenancy=default,HostId=My-DedicatedHostId --block-device-mappings file:///tmp/ebs_hana.json --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=MyHANA}]' 'ResourceType=volume,Tags=[{Key=Name,Value=MyHANAVolumes}]'


  • The --placement parameter is optional and needed only when you use a dedicated host with host tenancy or you want to place all your Amazon EC2 instances in close proximity. You may also pass additional parameters like private-ip-address, disable-api-termination, etc., as needed for your environment. For additional details, see run-instances in the AWS CLI Command Reference.

  • After the instance and volumes are created, you can adjust the values of Amazon EBS volume tags to be more specific for ease of management. You can also add any additional tags that you need.

  • For scale-out workloads, you can use the --count parameter to specify the total number of required nodes.

  • Amazon EC2 High Memory Instances can be launched only through AWS CLI or APIs. After launch, however, you can manage them by using the console, AWS CLI, or APIs.