Ethereum mining on AWS in 5mins

Written by steveng | Published 2017/05/10
Tech Story Tags: bitcoin | blockchain | ethereum | bitcoin-mining | ethereum-mining-on-aws

TLDRvia the TL;DR App

If you have come into this post, you must have heard of bitcoin mining. Bitcoin mining refer to using a node to verify transactions, compile them to a block, solve computational puzzles and submitting the block to the network for a block reward. Most of the effort in the step above are in solving those computationally intensive puzzles.

However, Bitcoin mining is no longer feasible for normal folks like you or me as the optimal hardware to mine is ASIC (Application-Specific Integrated Circuit) specially designed for solving for those computational puzzles. Using your own CPU or GPU will result in higher cost (electricity and hardware) than the potential reward.

Welcome Ethereum

Ethereum is a blockchain network, there are plenty of articles out there to describe the differences of Ethereum over Bitcoin. The main advantage is the blockchain ability to manage not just currency, but any possible item such as DNS in a decentralised manner.

Ethereum miners will also have to do exactly the same things as what Bitcoin miners does; except for those puzzles which require not just computational power, but also memory as well. This reduces the competitive advantage of ASIC over GPU.

Mining Ethereum on AWS

Let’s get started on how to mine some Ether on AWS!

Setting up instance

  1. Change your zone to US East (N. Virgina) as it appears to have the cheapest price for our instance type.
  2. Proceed to AWS, under EC2 console, select Spot Requests.
  3. Select Request for Spot InstanceUnder AMI: Search for ami-84f819f9 in community AMIsUnder Instance Type, select g2.8xlarge

  4. Click Next and launch the instance. By this step, you should see a instance coming up.

The reason why we choose ami-84f819f9 under AMI is to get an image that has cuda and ethereum client installed the moment you start your instance. You can do a history command to look at the commands ever typed or ps aux to ensure there’s no malicious processes running.

I have updated with another ami due to a plagiarized post. I hope hackernoon can do something about that.

Step 3: AMI and Instance Type selection.

Running the miner

A typical miner will join a mining pool. In this post, I will show how we can join dwarfpool.com/eth to mine. There’s no particular reason why I picked dwarfpool, there are plenty of mining pools available. In fact, I would recommend to try other mining pool for the security of the blockchain network.

  1. SSH into your instance
  2. Simply type the below in your instance`ethminer -G -F http://eth-eu.dwarfpool.com/${YOUR_ETH_ID}`

Once you type that, you should see Generating DAG and mining will commerce shortly. Joining dwarfpool allows you to easily track your mining status eg. see this link on the status of one of the miner.

If you would to join other mining pool, they would probably provide you with the URL to enter to join them.

Is it worth the money?

Sad to say, the cost price for the instance is more than what you can possibly earned from mining. As an example, here’s my result of mining for around 7hrs. The amount of ETH is 0.01 which is around 0.85 USD as per current ETH price of USD 85 where I’ve spent 7USD for the g2.8xlarge spot instance.

If you like this post or think that it has helped you, you can join an exchange using my referral link (I get some commission if you join and trade):

Hitbtc and Binance are trustable exchanges. In the last fork for bitcoin gold, they gave you 1 BTG for each BTC you had in the exchange within 24 hours, and its tradable immediately. On the other hand, Bittrex still have no news when its going to be traded at this point.

Alternatively, try out coinbase to trade your mined ETH easily, we get $10 worth of bitcoin each once you traded $100 worth

https://www.coinbase.com/join/58e399c5641b9462a2ee6410


Published by HackerNoon on 2017/05/10