Skip to content
GitHubXDiscordRSS

Environment

Learn how to create, update, and manage AWS M2 Environments using Alchemy Cloud Control.

The Environment resource lets you manage AWS M2 Environments for running applications in a secure and scalable manner.

Create a basic M2 Environment with required properties and a few common optional settings.

import AWS from "alchemy/aws/control";
const basicEnvironment = await AWS.M2.Environment("basic-m2-env", {
name: "BasicEnvironment",
engineType: "z/OS",
instanceType: "m5.large",
publiclyAccessible: true,
securityGroupIds: ["sg-0123456789abcdef0"],
subnetIds: ["subnet-0123456789abcdef0"],
description: "A basic M2 environment for testing."
});

Configure an M2 Environment with high availability and storage configurations.

const advancedEnvironment = await AWS.M2.Environment("advanced-m2-env", {
name: "AdvancedEnvironment",
engineType: "z/OS",
instanceType: "m5.xlarge",
highAvailabilityConfig: {
desiredCapacity: 2,
maxSize: 3,
minSize: 1
},
storageConfigurations: [
{
type: "EBS",
volumeSize: 100,
iops: 300
}
],
preferredMaintenanceWindow: "Sun:23:00-Sun:23:30"
});

Set up an M2 Environment with encryption and a specific maintenance window.

const secureEnvironment = await AWS.M2.Environment("secure-m2-env", {
name: "SecureEnvironment",
engineType: "z/OS",
instanceType: "m5.large",
kmsKeyId: "arn:aws:kms:us-west-2:123456789012:key/abcd1234-efgh-5678-ijkl-90mnopqrstuv",
description: "A secure M2 environment with encryption enabled.",
preferredMaintenanceWindow: "Mon:02:00-Mon:02:30"
});

Create an M2 Environment and assign custom tags for organizational purposes.

const taggedEnvironment = await AWS.M2.Environment("tagged-m2-env", {
name: "TaggedEnvironment",
engineType: "z/OS",
instanceType: "m5.large",
tags: {
Project: "Migration",
Environment: "Staging"
}
});