# Getting Started
# Download Saga Andromeda CLI
You can visit our Downloads page to download a pre-built gzipped tarball for your operating system.
# Prerequisites
By now we expect you to have installed the saga executable.
Before using it, we also need to ensure that you have an AWS account and that you have configured your AWS account according to the official docs (opens new window). If you have not already configured your AWS account (usually using aws configure), saga executable will help you set it up as well.
The key requirement is to have the following values available:
- Access key ID
- Secret access key
- AWS Region
To bypass setting these up, you can also export the following environment variables and saga executable will read those:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
In order to have the Access key ID and the Secret access key, you need to create a IAM user (opens new window).
Select Access key - Programmatic access as AWS access type when requested.
This user has typically not enough permissions for interacting with the needed AWS services. Then you have to create a Policy to configure all those required permissions. The policy should be created as follow:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:*",
"cloudwatch:*",
"logs:*",
"cloudformation:*",
"sts:*",
"ec2:*",
"elasticloadbalancing:*",
"autoscaling:*",
"eks:*"
],
"Resource": "*"
}
]
}
If you are using the Visual Editor for creating the policy, you must ensure to include all below services:
- STS
- IAM
- EC2
- ELB v2
- ELB
- CloudWatch
- EC2 Auto Scaling
- EKS
- CloudWatch Logs
- CloudFormation
- Cloud Control API
All of them must be configured with full access for all resources.
At this point you have to attach the policy to the IAM user created before.
# Initialize Saga
We can initialize saga by running saga init. This will let us know if we are missing any pieces of the system. A successful install will look like this:
$ saga init
2022-09-20T18:23:00-07:00 INF initializing SAGA_DIR...
2022-09-20T18:23:00-07:00 INF environment variable AWS_PROFILE is set to default
/Users/b/.saga/bin
2022-09-20T18:23:03-07:00 INF initialized SAGA_DIR (add SAGA_DIR=$HOME/.saga to your environment)
Note: By default, the saga init command uses an EC2 instance type of m5.2xlarge. To control the size of the instance created, simply pass the --instance-type <EC2 instance type> flag like so:
saga init --instance-type t3.large
The minimum requirements to be met by the selected EC2 instance type are as follows:
- CPU - 1 vCPU
- Memory - 2 GB
- Storage - 8 GB
See init for more details on the init command.
# Launch your cluster
Next, we want to initialize our cluster. The cluster will host our chainlets on an infrastructure provider, which is the argument passed to the command.
As of the Andromeda release, we only support aws.
$ saga cluster deploy aws
Once the deploy is complete, you should see some information about the cluster that was created:
...
2022-09-20T21:15:49-07:00 DBG Apply complete! Resources: 44 added, 0 changed, 0 destroyed.
2022-09-20T21:15:49-07:00 DBG
2022-09-20T21:15:49-07:00 DBG Outputs:
2022-09-20T21:15:49-07:00 DBG
2022-09-20T21:15:49-07:00 DBG cluster_endpoint = "https://05F0FAB6FA0F580979D543F1D4685A16.yl4.us-west-1.eks.amazonaws.com"
2022-09-20T21:15:49-07:00 DBG cluster_id = "saga-eks"
2022-09-20T21:15:49-07:00 DBG cluster_name = "saga-eks"
2022-09-20T21:15:49-07:00 DBG cluster_security_group_id = "sg-0707fd10e6bdd8c57"
2022-09-20T21:15:49-07:00 DBG region = "us-west-1"
# Launch your chainlet
The Saga EVM chainlet hosts an ethereum virtual machine running on a Cosmos SDK chain.
You can launch your chainlet with the name test by running saga chainlet launch test.
➜ saga chainlet launch test
2022-09-22T20:03:24-07:00 INF environment variable AWS_PROFILE is set to default
2022-09-22T20:03:25-07:00 INF created template dir=/Users/b/.saga/aws/kube name=test
2022-09-22T20:03:25-07:00 INF chainlet launched chainid (cosmos)=chainlet_1663902205-2 chainid (evm)=1663902205 name=test
You can use saga chainlet get test to ensure that the chainlet has the status Running.
You'll also find the chainlet's evm network information, which can be plugged into any evm tool (eg. Metamask, Truffle, Hardhat).
➜ saga chainlet get test
chainlet information
chainlet name: test
creation date: 22 Sep 22 23:13 -05
status: Running
endpoint: a81133aab3b9d4ca6981dfec73a032c7-1409eddb4a91d5ba.elb.us-west-1.amazonaws.com
ports: 26657,9090,1317,8545,8546
network information (evm)
network name: test Saga Chainlet
rpc url: http://a81133aab3b9d4ca6981dfec73a032c7-1409eddb4a91d5ba.elb.us-west-1.amazonaws.com:8545
chain id: 1663906420
currency symbol: SAGA
# Connecting to Metamask
Open up your browser and add the new network to your metamask.
Fill in the information based off what saga chainlet get test gave us:

Voila! You should be connected.
Next, let's get some tokens:
➜ saga chainlet faucet test 0xe55eE05901A971a1B9cfa4AD1894CC81EEE91799
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: '[]'
timestamp: ""
tx: null
txhash: BFEEA97AF3565088E905AC5193D3F5FF78532FD6665F820FC633CAF13CFE797B
Wait a few seconds before checking your metamask, and you should be able to see the tokens in your wallet!

# Delete your cluster
A previously created cluster can be deleted using the following command:
saga cluster delete aws - Deletes the created cluster and all associated infrastructure components
# Next steps
Checkout our developer docs for EVM developers using Remix, Truffle, and Hardhat.
For more information about the saga cli, see our CLI documentation.
Overview →