1.1. Create a VM from the AWS Web Console#

Here we will use an Amazon Elastic Compute Cloud (EC2) C6a instance to run a small CMAQ benchmark case. The software needed to run the benchmark is pre-installed on a public Amazon Machine Image (AMI). The AMI contains all the software required to spin up your virtual server including OS, libraries (MPI, netCDF, I/O API, CMAQ) as well as input data for the benchmark case, publicly available through the AWS Open Data Program.

The first step is creating an Virtual Machine (VM) from the AWS Web Console. If you are not able to access the AWS Web Console, skip to section 1.2 to learn how to use the AWS Command Line Interface (CLI).

Note

When working on the AWS Cloud you will need to select a Region for your workloads. (See AWS blog on What to consider when selecting a region). The scripts used in this tutorial use the us-east-1 region, but they can be modified to use any of the supported regions listed here: CLI v3 Supported Regions

1. Login to AWS Web Console and select EC2.

Login to AWS and then select EC2

  1. Click on the orange “Launch Instance” button.

Click on Launch Instance

  1. Search for AMI.

  2. Enter the AMI name: ami-051ba52c157e4070c in the search box and return or enter.

Search for AMI

  1. Click on the Community AMI tab and then and click on the orange “Select” button.

Choose Public AMI with CMAQ pre-installed

Note

This Amazon Machine Image (AMI) was built using a C6a EC2 Instance, with default Ubuntu OS (Ubuntu OS, 22.04 LTS, amd64 jammy), with gcc compilers, OpenMPI, netCDF, I/O API, and CMAQv5.4. Amazon EC2 C6a Instances To create a VM using a different family of EC2 instances, you would need to choose the default Ubuntu OS and follow the Developer Guide to install the compilers and software for CMAQv5.4.

  1. Search for c6a.2xlarge Instance Type and select it.

Note, the screenshots show the c6a.2xlarge instance type being selected. If you were running a larger benchmark, you would want to select a larger sized instance such as a c6a.8xlarge or c6a.48xlarge.

Select c6a.2xlarge instance type

  1. Select key pair name or create a new key pair.

Select key pair name or create new key pair

  1. Use the default network settings.

Use default network settings

  1. Review the storage options. The AMI is preconfigured to use 500 GiB of gp3 as the root volume (not encrypted).

Review Storage

  1. Select the pull-down options for Advanced details.

Select Advanced Details

  1. Select checkbox for Request Spot Instances.

Select Spot Instance Pricing

  1. Scroll down until you see option to Specify CPU cores.

  2. Click the checkbox for “Specify CPU cores”.

  3. Then select 4 Cores, and 1 thread per core.

Advanced Details turn off hyperthreading

If you are building a VM using a different instance type, just select 1 thread per core and leave the number of cores to the value that is pre-set. c6a.2xlarge (4 Cores), c6a.8xlarge (16 cores), c6a.48x large (96 cores).

  1. In the Summary Menu, select Launch Instance.

Launch instance

  1. Click on the link to the instance once it is successfully launched.

Successfully launched link

  1. Wait until the Status check has been completed and the Instance State is running

Instance State running

  1. Click on the instance link and copy the Public IP address to your clipboard.

Instance IP address

  1. You will use this Public IP address to login into the VM that you just created (c6a.2xlarge ec2 instance).

On your local computer, you will use the following command.

ssh -v -Y -i ~/downloads/your-pem.pem ubuntu@xx.xxx.xxx.xxx