Amazon Web Services (AWS) is a public cloud computing platform.
As with most cloud service providers, AWS offers a pay-as-you-use pricing policy , including a number of free services.
This guide is to help you get started with Amazon Elastic Compute Cloud (EC2) compute services, using Arm-based Graviton processors. This is a general-purpose compute platform, essentially your own personal computer in the cloud.
Detailed instructions are available in the Get started tutorial from AWS.
Before you begin, create an account. For a personal account, click on Create an AWS account , and follow the on-screen instructions to register. See the Creating an AWS account documentation for full instructions.
If using an organization’s account, you will likely need to consult with your internal administrator. See this guide for additional information.
AWS offers a wide range of instance types, covering all performance (and pricing) points. For an overview of the Graviton instance types, see the
Instance Type Explorer
, and select AWS Graviton
from the list of Processors
. As a general rule, instances with a g
at the end of their name (for example M6g
) are Graviton based.
Then, select an instance size
, which will be one of many pre-defined configurations of processors and available memory. If you are unsure what your compute needs are, don’t worry, you can easily experiment with different configurations.
The easiest way to launch your instance is via the AWS Console .
Note the region
you have logged into (for example us-east-1
) is displayed in the upper right corner. You can select a different location from the pull-down menu if your default region does not offer Graviton servers.
Navigate to the EC2 Dashboard
, either by searching (Alt+S
) for EC2
, or via Services
> Compute
> EC2
.
Use the Launch instance
pull-down menu and select Launch instance
.
Give your instance a meaningful, but arbitrary, name. This is particularly useful when creating multiple instances.
There are 1000s of Amazon Machine Images (AMIs) available on the AWS Marketplace , providing pre-configured setups.
For now, select Ubuntu
images from the Quick Start
list of available images, and version (e.g. Ubuntu Server 24.04 LTS
) from the pull-down menu.
In the Architecture
pull-down menu, select 64-bit (Arm)
to ensure an Arm-based instance type is used.
Select an appropriate instance type
for your compute needs from the pull-down menu. There is a Compare instance types
table available if you wish to quickly compare features of different types.
Scrolling down, there is an option to also configure storage
if necessary.
To be able to access the instance, you must use a key pair .
If this is your first time logging in, you will need to select Create new key pair
. If you have an existing key pair, select it from the pull-down menu.
If creating a new key pair, name the key pair, then click Create key pair
. This will initialize the key pair and save the private key to your local machine. Ensure that the private key is safe and accessible on your local machine.
It is strongly recommended that you create (or use an existing)
security group
to ensure that only users on your IP address can access your instance. Simple settings can be set here, such as selecting My IP
from the Allow SSH traffic from
pull-down menu. Other settings can be left as default.
For advanced settings, it is recommended that you search security groups
and create and configure such a group in this dialog. You can then select that group when creating the instance.
When all options are set, click Launch instance
to get started.
Your compute instance will be created and be available after initialization. Click the Instance ID
to observe the Instance state
and other details about your instance.
Once the Instance state
reports that it is Running
, you can connect to the instance. Click on the Instance ID
to display the Instance Summary
view which includes more details about your instance. You can also access this view from the list of Instances
on the EC2 dashboard
.
You can interact with your instance via the browser (EC2 Instance Connect) or via an SSH terminal application.
In the Instance summary
view, click Connect
, and select the EC2 Instance Connect
tab. Click the Connect
button to open a terminal in the browser.
Once connected, you are now ready to use your instance.
You can connect to the instance with your preferred SSH client. In the Instance summary
view, click Connect
, and select the SSH client
tab to see the command used to launch the native SSH client.
For example if using ubuntu
image:
ssh -i <private_key> ubuntu@<public_ip_address>
Replace <private_key>
with the private key on your local machine and <public_ip_address>
with the public IP of the target VM.
Terminal applications such as PuTTY , MobaXterm and similar can be used.
Different Linux distributions have different default usernames you can use to connect.
Default usernames for AMIs are listed in a table. Find your operating system and see the default username you should use to connect.
Once connected, you are now ready to use your instance.
Use the uname utility to verify that you are using an Arm-based server. For example:
uname -m
will identify the host machine as aarch64
.
Install the gcc
compiler. If you are using Ubuntu
, use the following commands. If not, refer to the
GNU compiler install guide
:
sudo apt-get update
sudo apt install -y gcc
Using a text editor of your choice, create a file named hello.c
with the contents below:
#include <stdio.h>
int main(){
printf("hello world\n");
return 0;
}
Build and run the application:
gcc hello.c -o hello
./hello
The output is shown below:
hello world
Cloud infrastructure deployment is typically done via Infrastructure as code (IaC) automation tools. There are Cloud Service Provider specific tools like AWS Cloud Formation . There are also Cloud Service Provider agnostic tools like Terraform .
There is a Deploying Arm instances on AWS using Terraform learning path that should be reviewed next.