Skip to main content

Guidance for Running Ethereum Clients on AWS

Overview

This Guidance helps you set up Ethereum nodes on AWS while optimizing the initial synchronization times. Many customers build applications integrated with the Ethereum blockchain and choose to run their own nodes to achieve more granular operational control and functionality that they can't find with serviced node providers. To help these customers, this Guidance proposes running nodes on AWS to speed up the initial sync process, which is the most time-consuming part of the setup. The reference architecture helps customers address operational problems by showing how to scale nodes and manage updates with minimal downtime.

How it works

These technical details feature an architecture diagram to illustrate how to effectively use this solution. The architecture diagram shows the key components and their interactions, providing an overview of the architecture's structure and functionality step-by-step.

Well-Architected Pillars

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

The deployment is fully automated with infrastructure as code (IaC). IaC allows you to define your entire workload as code, helping you to automate procedures, quickly implement changes, and consistently respond to events.

Read the Operational Excellence whitepaper 

You can use security groups on AWS to control traffic to associated resources. The solution uses a default VPC but creates new security groups, limiting Internet access only to the ports required for peer-to-peer communication. These security groups help ensure that only specific instances on AWS can access the JSON RPC ports on Ethereum nodes.

Read the Security whitepaper 

The sync node is periodically stopped to copy data to an S3 bucket. In case the RPC nodes in the EC2 Auto Scaling group fails, it can use the most recent copy of the data to restore the latest state and avoid a long sync time for data recovery.

Read the Reliability whitepaper 

Because Ethereum nodes run stateful, long-running and monolithic software, EC2 instances are the optimal choice for compute. Amazon Elastic Block Store (Amazon EBS) gp3 volumes use higher than standard IOPS and throughput to provide better response times. An Application Load Balancer ensures requests are spread across a highly available EC2 instances running RPC nodes.

Read the Performance Efficiency whitepaper 

AWS Compute Optimizer assists in finding the right sizing for the Ethereum Sync and RPC nodes. The RPC nodes are inside an EC2 Auto Scaling group, which scales according to the demand. 

Read the Cost Optimization whitepaper 

Use instances powered by Graviton2 and Graviton3 instance types with lower specifications for sync nodes. You need only one node to stay in sync. The RPC nodes usually require more resources, so using instances powered by Graviton 3 processers are more preferrable. All RPC nodes are also inside an Autoscaling Group, which allows RPC nodes to scale according to the demand. Use Compute Optimizer to verify the initial choice.

Read the Sustainability whitepaper 

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.