In my previous post I described setting up a macOS instance. Apple licensing means that the dedicated host has to run for at least 24 hours, and if you try and release the dedicated host before that time is up it won’t let you!


So I’m going to wait until 18:37 and then use the new AWS CloudShell to release it …

Clicking on the >_ icon at the top of the console now opens the CloudShell:

In the CloudShell I’m going to list my EC2 dedicated hosts using the AWS CLI with the following command:
aws ec2 describe-hosts --region eu-west-1
this returns some JSON, which includes the HostId for the mac1.metal Instance type.
Now I’m going to issue the following command:
aws ec2 release-hosts --host-ids h-08d67590e24a7153d
The return from that command shows that it’s been successful:

the console shows it has now been released (and thus it is no longer incurring charges):

Finally don’t forget to terminate the instance too, as well as the dedicated host, otherwise you will incur charges for the storage.
How much do macOS instances on AWS cost? I’ve been experimenting in the Ireland Region (eu-west-1) and the calculator at https://calculator.aws shows the following for onDemand instances:
- 1 instance(s) x 1.207 USD hourly x 730 hours in a month = 881.1100 USD (EC2 Dedicated Host)
- Amazon EC2 Dedicated Host cost (monthly): 881.11 USD
- Amazon EC2 Dedicated Host cost (upfront): 0.00 USD
- 30 GB x 0.088 USD x 1 instance(s) = 2.64 USD (EBS Storage Cost)
- Amazon Elastic Block Storage (EBS) pricing (monthly): 2.64 USD
So for 24 hours (the minimum duration):
- 1 instance(s) x 1.207 USD hourly x 24 hours = $28.968 USD (EC2 Dedicated Host)
- Amazon EC2 Dedicated Host cost (upfront): 0.00 USD
- Amazon Elastic Block Storage (EBS) pricing (24 hours, charged at $0.11 per GB-month in Ireland) – $0.11 x 30 GB x 86400 seconds / 86400 * 30 = $0.11 (or free tier!)
Using EC2 Savings Plans or Compute Savings plans will apply discounts to these figures, for example to maximise the discount using 3 years all upfront pricing:
- Hours in the commitment: 3 year x 365 days x 24 hours = 26280 hours
- Total Commitment: 0.681 USD x 26280 hours = 17896.6800 USD
- Upfront: All Upfront (100% of 17896.6800) = 17896.6800 USD
- Hourly cost = (Total Commitment – Upfront cost)/Hours in the term: (17896.6800 – 17896.6800) / 26280 = 0.0000 USD
- *Please note that you will pay an hourly commitment for Savings Plans and your EC2 Dedicated Host usage will be accrued at a discounted rate against this commitment.
- 1 instance(s) x 0.0000 USD hourly x 730 hours in a month = 0.0000 USD (EC2 Dedicated Host)
- Amazon EC2 Dedicated Host cost (monthly): 0.00 USD
- 1 instance(s) x 17896.6800 USD = 17896.6800 USD
- Amazon EC2 Dedicated Host cost (upfront): 17,896.68 USD
It means the use case for Macs in the cloud needs to be carefully considered from an economic perspective – does it stack up versus buying some physical machines and putting them in colocation or the corner of the office and then having the additional management overhead? A similarly specified Mac Mini costs around £1800 today to purchase…