AWS for SAP

Automate SAP Deployments with AWS Launch Wizard for SAP APIs

Automate SAP Deployments with AWS Launch Wizard for SAP APIs

AWS Launch Wizard offers customers a fully automated process for deploying secure, high-performing, resilient, and efficient HANA-based SAP applications on AWS in just a few hours vs. weeks or months on-premises. The AWS Launch Wizard for SAP service provisions all of the necessary AWS resources required to install and configure the SAP application and HANA database systems following both AWS, SAP, and operating system vendor best practices. Customers like Nvidia, UNOX, and Storengy have accelerated their SAP migration by taking advantage of AWS Launch Wizard.

Since its launch in April 2020, the AWS for SAP team has been listening to feedback from customers and partners to continually enhance the AWS Launch Wizard service. Based on the feedback, we have delivered several key improvements – automated deployment of SAP application software, customized deployments through pre/post deployment scripts, and integration with AWS service catalog. Additionally, the Launch Wizard team consistently delivers new features that leverage the latest capabilities from AWS, SAP, and operating systems. This future-proofs customer investments by keeping pace with latest innovations across all tiers of an SAP application.

One of the top feature requests from customers has been the ability to integrate Launch Wizard with their existing deployment tools and scripts. We announced in early November that customers can now use Application programming interface calls (API) to deploy SAP systems programmatically, without needing to login to the AWS Management Console.

In this blog, we will share details on the new AWS Launch Wizard APIs that allow programmatic deployment of SAP S/4HANA system.

AWS Launch Wizard APIs Overview

AWS Launch Wizard APIs allow you to initiate the following actions:

  • CreateDeployment: Deploys workload with given settings
  • ListDeployments: List deployments that have been created
  • GetDeployment: Get details about a given deployment
  • DeleteDeployment: Delete a given deployment
  • ListDeploymentEvents: List all actions taken during a deployment
  • ListWorkloads: List all available workloads supported by AWS Launch Wizard.
  • ListWorkloadDeploymentPatterns: List all deployment patterns for a specific workload
  • GetWorkload: Get details about a specific workload

Deployment specifications:

Deployment specifications can be used to provide information to deploy the applications as per your needs. Using a deployment specification you can provide infrastructure related specifications like Amazon Virtual Private Cloud, Subnet, Security Groups etc and application specifications such as SAP System identifier (SID), SAP software type and version that needs to be deployed. Each of the supported deployment pattern require a different set of specifications as described in the URL. Launch Wizard API’s support deployment of SAP HANA database and NetWeaver based applications running on following deployment patterns.

SAP HANA
Following deployment patterns are supported for SAP HANA workloads

  • SAP HANA high-availability
  • SAP HANA multi-node
  • SAP HANA single-node

SAP Applications
Following deployment patterns are supported for SAP NetWeaver based applications such as S/4HANA, S/4 Foundations, Solution Manager, SAP BW/4HANA, NetWeaver ABAP and Java.

  • High-availability
  • Multi-node/Distributed deployment
  • Single-node/Central deployment

Use cases:

AWS Launch Wizard APIs enhance the use of Launch Wizard service from being only a console based service before this launch. These APIs no longer mandate a operator/admin to interact live with the console to deploy SAP applications, truly unattended deployments can be achieved after initial testing/validation effort. Here are some use cases that Launch Wizard APIs enable

Speed up SAP deployments further: Build automation routines that will allow you to tweak few parameters such as SID, Instance number, Sizing to quickly provision SAP applications

Optimize Disaster recovery process: Leverage Launch Wizard API as part of your disaster recovery plans by building system templates that can be used to provision baseline system during Disaster Recovery testing/event. These templates bring consistency and repeatability to your DR processes eliminating any errors that could happen deploying a system using the console manually.

Temporary or N+1 landscapes setup: Leverage AWS Launch Wizard for SAP API to speed up the SAP systems deployment process while standing up a temporary project landscape or a permanent N+1 landscape.

Example: SAP S/4HANA Deployment using the AWS Launch Wizard for SAP APIs

In this example, we will use the AWS Command Line Interface (AWS CLI) to access the new AWS Launch Wizard for SAP APIs and deploy an SAP S/4HANA system with ABAP SAP Central Service (ASCS), Primary Application Server (PAS) and SAP HANA database in a single EC2 instance.

Prerequisites:

  1. An AWS Account
  2. Install and configure the latest AWS CLI (see this documentation), minimum required version is  AWS CLI version2.
  3. Complete AWS Launch Wizard for SAP general and IAM prerequisites (see this documentation)
  4. Download and prepare SAP application and database installation media (see this documentation)

Step 1: Prepare deployment specifications file
The AWS Launch Wizard for SAP API uses a JSON-formatted text file to define the specific configuration details about your deployment that would normally be entered through the AWS Console. Refer to SAP Deployment Specifications for list of all parameters that are applicable to configure your SAP applications based on the deployment pattern.

{
  "KeyPairName": "ExampleKeyPair",
  "VpcId": "vpc-a1b2c3d4",
  "AvailabilityZone1PrivateSubnet1Id": "subnet-11111111aaaaaaaaa",
  "Timezone" :"PST",
  "EnableEbsVolumeEncryption" :"Yes",
  "EbsKmsKeyArn" : "arn:aws:kms:us-east-1:111122223333:alias/aws/ebs",
  "CreateSecurityGroup" :"No",
  "DatabaseSecurityGroupId" :"sg-1234567890abcdef0",
  "ApplicationSecurityGroupId" :"sg-021345abcdef6789",
  "SidAdmUserId" :"7002",
  "SapSysGroupId" :"5001",
  "DatabaseSystemId" :"HYD",
  "SapSid" :"S4K",
  "ApplicationDataVolumeType" :"gp2",
  "DatabaseInstanceNumber" :"30",
  "InstallAwsBackintAgent" :"Yes",
  "BackintSpecifications": "{\"backintBucketName\":\"launchwizardsoftware\",\"backintBucketFolder\":\"HANABackintBucketFolder\",\"backintBucketRegion\":\"us-east-1\",\"backintKmsKeyArn\":\"arn:aws:kms:us-east-1:111122223333:alias/aws/s3\",\"backintAgentVersion\":\"2.0.2.732\",\"backintContinueOnFailure\":\"No\",\"backintCreateEbsVolume\":\"No\"}",
  "CentralSystemOperatingSystem" :"SuSE-Linux-15-SP2-For-SAP-HVM",
  "CentralSystemAmiId" :"ami-1234567890abcdef0",
  "CentralSystemInstanceType" :"r5.8xlarge",
  "CentralSystemHostname" :"apis4sin",
  "SapPassword" :"EXAMPLE-PASSWORD",
  "DatabaseLogVolumeType" :"io2",
  "SetupTransportDomainController" :"Yes",
  "InstallSap" :"Yes",
  "SapInstallationSpecifications": "{\"parameters\":{\"PRODUCT_ID\":\"saps4hana-2021\",\"HDB_SCHEMA_NAME\":\"SAPABAP1\",\"CI_INSTANCE_NR\":\"22\",\"ASCS_INSTANCE_NR\":\"20\",\"SAPINST_CD_SAPCAR\":\"s3:\/\/launchwizardsoftware\/sapmedia\/sapcar\",\"SAPINST_CD_SWPM\":\"s3:\/\/launchwizardsoftware\/sapmedia\/swpm\/20-sp10\",\"SAPINST_CD_KERNEL\":\"s3:\/\/launchwizardsoftware\/sapmedia\/kernel\/785\",\"SAPINST_CD_LOAD\":\"s3:\/\/launchwizardsoftware\/sapmedia\/exports\/s4h-2021\",\"SAPINST_CD_RDBMS\":\"s3:\/\/launchwizardsoftware\/sapmedia\/database\/hana-20-sp06-rev60\",\"SAPINST_CD_RDBMS_CLIENT\":\"s3:\/\/launchwizardsoftware\/sapmedia\/hana-client\/20-11\"}, \"onFailureBehaviour\": \"CONTINUE\"}",
  "SnsTopicArn" :"arn:aws:sns:us-east-1:111122223333:InstallStatus",
  "SaveDeploymentArtifacts" :"Yes",
  "DeploymentArtifactsS3Uri" :"s3://launchwizardsoftware",
  "DisableDeploymentRollback" :"Yes",
  "CentralSystemAutomaticRecovery": "Yes",
  "DatabaseDataVolumeType": "gp3"
}

Step 2: Validate deployment specifications
Before starting your deployment, you can use the optional “dry-run” flag of the create deployment action to validate your specifications and check whether you have the required permissions for the action.

// Example command values
aws launch-wizard create-deployment \
--workload-name SAP \
--deployment-pattern-name SapNWOnHanaSingle
--name S4HanaSingleTest \
--dry-run \
--region us-east-1 \
--specifications file://s4hana-single.json

If there are no issues with your deployment, you should get the following message:

// Example JSON response
{
"deploymentId": "Dry run is successful"
}

Step 3: Start deployment
After you have validated your deployment specifications using the dry-run, trigger the actual deployment using the flag —no-dry-run

// Example command with sample values
aws launch-wizard create-deployment \
--workload-name SAP \
--deployment-pattern-name SapNWOnHanaSingle
--name S4HanaSingleTest \
--no-dry-run \
--region us-east-1 \
--specifications file://s4hana-single.json

You get a deployment id as shown below and you can use this id later to track the progress of your deployment

// Example JSON response
{
"deploymentId": "72c26320-6d17-4e55-992c-b3ad8d47331d"

}

Step 4 – Check status of Deployment
You can use the “list-deployment-events” action to list the events and check the status of your deployment.

// Example command values
aws launch-wizard list-deployment-events \
--deployment-id 72c26320-6d17-4e55-992c-b3ad8d47331d \
--region us-east-1

The screenshot below shows an sample JSON response for the list-deployments-events API command

// Example JSON response
{
    "deploymentEvents": [
            {
            "name": "Validate Resource Limits (CFN, VPC, EIP, IGW)",
            "description": "Validate Resource Limits (CFN, VPC, EIP, IGW)",
            "status": "Completed",
            "statusReason": "Resource limit validation completed successfully",
            "timestamp": "2023-10-26T12:18:34.721000-04:00“
            },
            {
            "name": "Create resource group",
            "description": "Creates a resource group with all the application resources",
            "status": "COMPLETED",
            "statusReason": "",
            "timestamp": "2023-10-26T12:18:32.937000-04:00"
            },
            {
            "name": "Create secret",
            "description": "Creates a new secret",
            "status": "COMPLETED",
            "statusReason": "",
            "timestamp": "2023-10-26T12:18:33.392000-04:00"
            },
            {
            "name": "Creates the infrastructure for the application deployment",
            "description": "Creates the infrastructure for the application deployment",
            "status": "IN_PROGRESS",
            "statusReason": "",
            "timestamp": "2023-10-26T12:19:52.694000-04:00"
            }
    ]
}

Once the deployment is successfully completed you can get the status of your deployment using the API command list-deployments:

// Example command values
aws launch-wizard list-deployments \
--region us-east-1

The screenshot below shows an sample JSON response for the list-deployments-events API command

// Example JSON response
{
    "deployments": [
        {
            "name": "S4HanaSingleTest",
            "id": "a572f36c-5b06-4fb5-932c-61e684ca3159",
            "workloadName": "SAP",
            "patternName": "SapNWOnHanaSingle",
            "workloadVersionName": "2023-10-26-00-00-00",
            "status": "COMPLETED",
            "createdAt": "2023-10-26T22:02:39.413000-05:00"
        }
      ]
 }     

Troubleshooting
To troubleshoot any issues with AWS Launch Wizard for SAP, refer to the Launch Wizard Troubleshooting Guide.

Conclusion

In this blog, you learned about how to deploy SAP systems on AWS programmatically using AWS Launch Wizard for SAP APIs. Deploying SAP systems using this new feature removes the need to into the AWS Launch Wizard for SAP console and configure the steps for deployment manually. To learn more, please visit the AWS Launch Wizard Detail Page and documentation.

If you are attending AWS re:Invent 2023, come see how easy it is to deploy and scale a highly available SAP S/4HANA system using the AWS Launch Wizard APIs in ENT312 — Deploy and optimize SAP on AWS with DevOps. AWS for SAP experts will be on hand to walk you through the process and answer any questions you have about running SAP on AWS.