Launch a Mac instance using the AWS Management Console or the AWS CLI
EC2 Mac instances require a Dedicated Host. You first need to allocate a host to your account, and then launch the instance onto the host.
You can launch a Mac instance using the AWS Management Console or the AWS CLI.
Launch a Mac instance using the console
To launch a Mac instance onto a Dedicated Host
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
Allocate the Dedicated Host, as follows:
-
In the navigation pane, choose Dedicated Hosts.
-
Choose Allocate Dedicated Host and then do the following:
-
For Instance family, choose mac1, mac2, mac2-m2, mac2-m2pro, or mac2-m1ultra. If the instance family doesn’t appear in the list, it’s not supported in the currently selected Region.
-
For Instance type, choose mac1.metal, mac2.metal, mac2-m2.metal, mac2-m2pro.metal, or mac2-m1ultra.metal based on the instance family chosen.
-
For Availability Zone, choose the Availability Zone for the Dedicated Host.
-
For Quantity, keep 1.
-
Choose Allocate.
-
-
-
Launch the instance on the host, as follows:
-
Select the Dedicated Host that you created and then do the following:
-
Choose Actions, Launch instance(s) onto host.
-
Under Application and OS Images (Amazon Machine Image), select a macOS AMI.
-
Under Instance type, select the appropriate instance type (mac1.metal, mac2.metal, mac2-m2.metal, mac2-m2pro.metal, or mac2-m1ultra.metal).
-
Under Advanced details, verify that Tenancy, Tenancy host by, and Tenancy host ID are preconfigured based on the Dedicated Host you created. Update Tenancy affinity as needed.
-
Complete the wizard, specifying EBS volumes, security groups, and key pairs as needed.
-
In the Summary panel, choose Launch instance.
-
-
A confirmation page lets you know that your instance is launching. Choose View all instances to close the confirmation page and return to the console. The initial state of an instance is
pending
. The instance is ready when its state changes torunning
and it passes status checks.
-
Launch a Mac instance using the AWS CLI
Allocate the Dedicated Host
Use the following allocate-hosts command to allocate a Dedicated Host for your Mac
instance, replacing the instance-type
with either
mac1.metal
, mac2.metal
, mac2-m2.metal
, mac2-m2pro.metal
, or
mac2-m1ultra.metal
, and the region
and availability-zone
with the appropriate ones for your environment.
aws ec2 allocate-hosts --region
us-east-1
--instance-typemac1.metal
--availability-zoneus-east-1b
--auto-placement "on" --quantity 1
Launch the instance on the host
Use the following run-instances command to launch a Mac instance, again replacing the
instance-type
with either mac1.metal
, mac2.metal
, mac2-m2.metal
, mac2-m2pro.metal
, or mac2-m1ultra.metal
, and the region
and availability-zone
with the ones used previously.
aws ec2 run-instances --region
us-east-1
--instance-typemac1.metal
--placement Tenancy=host --image-idami_id
--key-namemy-key-pair
The initial state of an instance is pending
. The instance is ready when its
state changes to running
and it passes status checks. Use the following
describe-instance-status
command to display status information for your instance.
aws ec2 describe-instance-status --instance-ids
i-017f8354e2dc69c4f
The following is example output for an instance that is running and has passed status checks.
{ "InstanceStatuses": [ { "AvailabilityZone": "us-east-1b", "InstanceId": "i-017f8354e2dc69c4f", "InstanceState": { "Code": 16, "Name": "running" }, "InstanceStatus": { "Details": [ { "Name": "reachability", "Status": "passed" } ], "Status": "ok" }, "SystemStatus": { "Details": [ { "Name": "reachability", "Status": "passed" } ], "Status": "ok" } } ] }