[SEO Subhead]
This Guidance shows how to deploy a secure, scalable, and cost-efficient blockchain key management solution for blockchain validation workloads like Ethereum 2.0 proof-of-stake networks. It leverages AWS Nitro Enclaves to run Web3Signer, a core component for building secure blockchain networks. This solution provides sample code for securely configuring, bootstrapping, and operating Web3Signer within the isolated Nitro Enclaves environment using the AWS Cloud Development Kit (AWS CDK). This allows you to establish reliable and secure blockchain networks while safeguarding sensitive data and mitigating potential risks.
Please note: [Disclaimer]
Architecture Diagram
[Architecture diagram description]
Step 1
Run the AWS Cloud Development Kit (AWS CDK) stack through your local machine.
Step 2
Once you run the AWS CDK stack, the required container artifacts are uploaded to the Amazon Elastic Container Registry (Amazon ECR). All Docker containers will be pulled from Amazon ECR later.
Step 3
Config artifacts are encrypted through a symmetric encryption key using AWS Key Management Service (AWS KMS).
Step 4
Encrypted config artifacts are stored in Amazon DynamoDB.
Step 5
Run the Web3Signer initialization with an AWS Systems Manager command.
Step 6
AWS Nitro Enclaves automatically decrypt config artifacts through AWS KMS using cryptographic attestation.
Step 7
The Web3Signer process starts with Nitro Enclaves and exposes the HTTPS API on a parent Amazon Elastic Compute Cloud (Amazon EC2) instance.
Step 8
Control the Web3Signer status through the AWS Lambda console. The state command provides information about the current status of the Lambda function.
Step 9
Requests are routed through a Network Load Balancer to the next healthy Amazon EC2 instance that runs isolated in a private subnet.
Step 10
Requests originating from the Amazon EC2 validator or consensus client can be routed to a Web3Signer instance through a Network Load Balancer. The validator client is not enclosed in this Guidance.
Well-Architected Pillars
The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.
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.
-
Operational Excellence
This Guidance provides mechanisms for implementing changes (AWS CDK), gathering feedback (GitHub), and secure instance management (Systems Manager). This allows you to safely make updates, incorporate improvements, and operate resources without compromising security. Adhering to proven operational best practices helps achieve reliable, high-performing workloads.
-
Security
By implementing the robust security controls of this Guidance, you protect your information, systems, and assets. For example, resources are protected by deploying them in a separate VPC with private subnets, allowing internet access only through NAT gateways. Access to Amazon EC2 instances is restricted, with no inbound access allowed and administrator access granted only through Systems Manager. Data, including sensitive private key material and Web3Signer configurations, is encrypted using AWS KMS and stored in DynamoDB, with cryptographic attestation ensuring decryption only within the Nitro Enclaves.
-
Reliability
The Guidance implements a highly available network topology with an Auto Scaling group deployed across two different Availability Zones, ensuring at least two active instances at any time. A Network Load Balancer distributes traffic between these instances. The application-level architecture is designed for reliability, with loosely coupled dependencies, stateless compute processes inside the Nitro Enclaves, and the ability to automatically recover from failures.
-
Performance Efficiency
The Guidance leverages an Auto Scaling group to match demand and help ensure that only the minimum resources required are running. The blockchain validation client and consensus client can be deployed in private and public subnets, respectively, within the same VPC to decrease latency and improve performance.
-
Cost Optimization
The Guidance avoids services and storage options with high monthly fixed costs. For long-term operation, the Amazon EC2 instances should be part of an Amazon EC2 Instance Savings Plan, which can reduce costs compared to using on-demand instances. The default instance type is C6A.xlarge, the smallest instance currently supporting Nitro Enclaves.
-
Sustainability
By using an Auto Scaling group, this Guidance helps to ensure the high availability of your workloads while minimizing the number of Amazon EC2 instances running. This solution can be easily extended to scale out or in as needed, optimizing resource utilization based on demand.
Implementation Resources
The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.
Related Content
[Title]
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.
References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.