Skip to content
GitHubXDiscord

Application

The Application resource lets you manage AWS SystemsManagerSAP Applications and their associated configurations.

Create a basic SAP application with required properties and one optional tag.

import AWS from "alchemy/aws/control";
const sapApplication = await AWS.SystemsManagerSAP.Application("mySapApplication", {
ApplicationId: "sap-app-123",
ApplicationType: "S4HANA",
Instances: ["i-0abcd1234efgh5678"],
Tags: [{
Key: "Environment",
Value: "Production"
}]
});

Configure an SAP application with additional optional properties, such as credentials and a database ARN.

const advancedSapApplication = await AWS.SystemsManagerSAP.Application("advancedSapApplication", {
ApplicationId: "sap-app-456",
ApplicationType: "S4HANA",
Instances: ["i-0abcd1234efgh5678"],
DatabaseArn: "arn:aws:rds:us-west-2:123456789012:db:mysql-db",
Credentials: [{
Username: "admin",
Password: "securePassword123!"
}],
ComponentsInfo: [{
Name: "ApplicationServer",
Version: "1.0.0"
}]
});

This example demonstrates how to adopt an existing SAP application instead of failing when the resource already exists.

const adoptedSapApplication = await AWS.SystemsManagerSAP.Application("existingSapApplication", {
ApplicationId: "sap-app-789",
ApplicationType: "S4HANA",
Instances: ["i-0abcd1234efgh5678"],
adopt: true // Adopts the existing resource
});

Create an SAP application configured with multiple instances for enhanced availability.

const multiInstanceSapApplication = await AWS.SystemsManagerSAP.Application("multiInstanceSapApplication", {
ApplicationId: "sap-app-101",
ApplicationType: "S4HANA",
Instances: ["i-0abcd1234efgh5678", "i-0abcd1234ijklmnop"],
Tags: [{
Key: "Environment",
Value: "Staging"
}]
});