Guidance for Minting Ethereum-based NFTs on AWS
Harness the power of Amazon Managed Blockchain to deploy Ethereum nodes
Overview
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.
Operational Excellence
Using Managed Blockchain, the deployment of Ethereum full node(s) to connect to public testnets and the Ethereum mainnet can be completed in a matter of minutes, which contrasts to the slow deploy and sync times of self-hosted Ethereum nodes that can take 24-36 hours in some cases. Observability is built into the solution with process level metrics, logs, and dashboards. Extend these mechanisms to your needs, and create alarms in Amazon CloudWatch to inform your on-call team on any issues. Finally, the deployment of this solution can be automated with infrastructure as code frameworks such as Cloud Development Kit (CDK) or AWS CloudFormation.
Security
The serverless backend is protected with authentication provided by an Amazon Cognito User Pool, which prevents API endpoints from being called by unauthorized users. Using AWS Identity and Access Management (AWS IAM) role(s), the backend Lambda functions have access only to the services they need when making requests to the API Gateway REST API. The most sensitive data in any blockchain solution is the private key(s) that make up a user’s wallet. The confluence of Nitro Enclaves, AWS KMS, Secrets Manager, and Systems Manager provide an isolated, secure compute environment for key derivation and signing.
Reliability
Various components in the architecture are deployed across multiple Availability Zones, such as the Managed Blockchain Ethereum nodes and the hosts for Nitro Enclaves. By nature, all the serverless components such as AWS Fargate and Lambda are highly available, and automatically scale to accommodate demand. To further increase reliability, consider implementing DynamoDB Global Tables and backups to replicate user balance and transaction status data across Regions.
Performance Efficiency
By using serverless technologies, you provision only the exact resources required for your workload. Using Amazon CloudFront, both the static content for the client web application and the underlying metadata and content for the NFT can be globally served through AWS points-of-presence around the world. Right-sizing the instances that host the Nitro hypervisor for Nitro Enclaves will render the ideal performance for signing operations, which can be identified with testing with various transaction payloads and volumes. Furthermore, for optimized performance in Lambda functions, utilize Lambda Power Tuning to choose the ideal memory allocation by profiling different memory allocations and the resulting duration and cost per execution.
Cost Optimization
By utilizing serverless technologies, you pay only for the resources you use. Using tools such as Lambda Power Tuning to identify the ideal memory allocation for your performance goals, you can identify the optimal balance of cost and performance for your Lambda function executions. In addition, using Nitro Enclaves for isolated compute during signing operations presents significant cost savings to using AWS KMS customer-managed keys (CMKs) for signing operations where your fixed cost grows in a linear fashion on a per-wallet3 basis. To further optimize cost, you can utilize the Amazon S3 Intelligent-Tiering storage class, which automatically selects the ideal cost-effective storage tier for your content depending on its access patterns, such as frequency of access.
Sustainability
By extensively utilizing managed services and dynamic scaling, we minimize the environmental impact of the backend services. Furthermore, as the public Ethereum blockchain mainnet and testnets shift from the Proof-of-Work to the Proof-of-Stake consensus mechanism in late 2022, it will bring a 99.5%+ reduction in energy consumption in operating the networks.
Disclaimer
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages