This article provides an overview of the public preview version of the newly launched AMB Access Polygon product, briefly introducing how AMB Access Polygon supports developers in developing applications on Polygon, and introducing the use case of specific customers using AMB Access for application development. For the original AWS official blog, please refer to https://aws.amazon.com/blogs/database/build-on-the-polygon-network-with-amazon-managed-blockchain-access/.
Learn more: https://aws.amazon.com/tw/local/hongkong/web3/
As developers in the blockchain industry strive to develop applications that are suitable for mainstream use, the focus has shifted away from tasks such as running blockchain nodes, extracting blockchain data, and developing standard APIs. Configuring, providing, and maintaining a large number of public blockchain nodes may consume too many resources, and running these nodes in a highly available, highly elastic, and high-performance manner requires expensive infrastructure costs and additional human time and effort.
When cost optimization becomes the primary consideration for customers, limited developer resources are best invested in work that directly adds value to the business. Amazon Managed Blockchain (AMB) Access Bitcoin is the first JSON Remote Procedure Call (JSON-RPC) API based on serverless architecture launched on the AMB service, which can meet the aforementioned needs, help you reduce the fixed cost increase caused by running blockchain nodes, get rid of heavy and undifferentiated work, and use high-performance JSON-RPC API on a pay-as-you-go basis to process request traffic from a series of blockchain nodes managed by Amazon Web Services.
In response to customer demand, in the public preview version, AMB Access now supports the Polygon Proof-of-Stake (POS) network, including the Polygon mainnet and Mumbai testnet. With AMB Access Polygon, developers can use Polygon JSON-RPC APIs through accessible endpoints, which provide predictable pay-as-you-go pricing to develop applications that interact with the Polygon network. AMB Access Polygon can meet the needs of various scenarios, including frequent access to Polygon JSON-RPC APIs in a highly available manner and intermittent, unpredictable access scenarios.
This article provides an overview of the newly launched public preview version of the AMB Access Polygon product. It briefly describes how AMB Access Polygon supports developers in developing applications on Polygon, and introduces some specific customer use cases that are using AMB Access for application development. You can find more information and resources on how to get started building on Polygon in the Amazon Managed Blockchain Access Polygon Developer Guide at https://docs.aws.amazon.com/managed-blockchain/latest/ambp-dg/key-concepts.html.
AMB Access is a fully managed service that provides access to public and private blockchains. AMB Access allows builders to develop and launch Web3 applications with scalability, security, and resilience. You can choose different ways to connect to public blockchains, including fully managed, single-tenant (dedicated), and serverless multi-tenant APIs to access public blockchain nodes.
In the public preview version of AMB Access Polygon, you can now take full advantage of Polygon's features and quickly process transactions at low transaction fees on Amazon Web Services' secure and scalable infrastructure. Access Polygon allows real-time, serverless access to the Polygon blockchain with no minimum cost requirements. With Access Polygon, developers can use public endpoints to remotely call the Polygon mainnet and Mumbai testnet without the need for specialized blockchain infrastructure.
AMB Access Polygon allows developers to interact instantly with the Polygon mainnet and Mumbai testnet to build various applications, such as non-fungible token (NFT) markets, loyalty reward platforms, or real-world asset (RWA) tokenization engines, without managing blockchain infrastructure. You can access Polygon nodes (including archive nodes) in a fully managed serverless manner, enabling scalability.
The following diagram shows the architecture for interacting with the Polygon network through backend applications or directly through client applications.
For developers building applications on Polygon, AMB Access has the following advantages:
· Shorten product release time - AMB Access allows developers to focus on the product to be released and its specific features, without spending time on configuration or setup, thereby speeding up the product release process.
· Automatic Scaling - With the increase of workload, the automatic scaling feature of AMB Access helps you easily expand your blockchain applications.· Efficient Management - You can efficiently operate blockchain applications with an easy-to-understand pay-as-you-go pricing model that can save up to 80% of blockchain node costs compared to managing your own infrastructure.
· Production-level applications - You can build blockchain applications that are suitable for production-level environments, based on Amazon Web Services' reliability, security, and availability standards (99.9% uptime).
AMB Access Polygon supports various JSON-RPC APIs provided by Polygon node groups, enabling developers to build almost any type of blockchain application - from digital asset scenarios to digital identity.
For example, financial service institutions can use AMB Access Polygon to provide custody or trading services for digital assets. These services require reading data from the blockchain through JSON-RPC API and broadcasting transactions signed by users. Game studios can create NFTs that can be used in games, and players can exchange NFTs through the Polygon trading market. Consumer brands can provide fungible tokens (FT) and use them for loyalty reward systems to reward their most loyal fans and users. These are just a few of the scenarios that customers of Amazon Web Services are exploring with AMB Access.
The following reference architecture demonstrates a decentralized application (dApp) developed on the Polygon blockchain using AMB Access.
This hybrid dApp architecture supports both hosted wallets and non-hosted wallets. In the case of hosted wallets, a trusted third-party institution manages the user's encryption keys and uses them to spend digital assets in the backend system. In the case of non-hosted wallets, users manage their own encryption keys and sign and broadcast transactions directly through client CLI, web applications, or mobile applications. This reference architecture represents the basic components of a dApp, but it can also be extended and embedded with various other Amazon Web Services to meet different functional requirements. The functionality of this architecture is described below:
· Amazon CloudFront provides global access to static web content (such as React Native applications) distributed through the decentralized file storage protocol InterPlanetary File System (IPFS). Application load balancers are used to balance requests across multiple IPFS Gateway nodes, which are responsible for routing requests to the IPFS network and distributing content from the IPFS network.
· For users of web applications that use CloudFront and IPFS to provide services, some users may wish to delegate the management responsibility of their wallets (encryption keys) to third-party hosting providers. These users will be authenticated through traditional login mechanisms such as OAuth and multi-factor authentication, and will make API calls through REST API. In this architecture, user authentication is handled by Amazon Cognito, which protects API (REST API) requests sent to Amazon API Gateway.
· When a user makes a request (such as conducting digital asset transactions on the Polygon network), the API Gateway triggers an AWS Lambda function, which signs the transaction through the AWS Lambda function and broadcasts it to the blockchain via AMB Access Polygon.
· Use the user unique identifier provided for the request (encoded with authentication token), Lambda triggers the secure transaction signature module, which uses the privacy computing environment in Amazon Nitro Enclaves to sign Polygon transactions with the user's highly sensitive managed private key. In the transaction signature module, Amazon Systems Manager is responsible for managing access to isolated Amazon Elastic Compute Cloud (Amazon EC2) instances, Amazon Key Management Service (Amazon KMS) is responsible for managing the symmetric encryption keys used to generate private keys, and Amazon Secrets Manager is responsible for securely storing and managing encrypted private keys (ciphertext).
· After signing the security of the transaction using the user's private key, Lambda will broadcast the signed transaction to the public Polygon network through the JSON-RPC API provided by AMB Access. The eth_sendRawTransaction request will return a transaction hash (ID), which can be used in subsequent JSON-RPC requests to retrieve transaction information and its status on the blockchain.
· In addition, non-custodial users who have their own wallet (encryption key) can sign transactions with their wallet through the application (client) and broadcast them directly to AMB Access without using the backend system. Amazon Cognito identity pools can be used to delegate credentials for IAM roles, which can grant access to Amazon Managed Blockchain resources.
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia