After a couple of weeks of study on Amazon managed blockchain, I have realized that we need chaincode to read and write data to hyperledger fabric blockchain.
Chaincode is a program developed in Node, Java or Go languages that will run on peer node in a Docker container. So chaincode implements the business logic of how applications interact with the ledger.
Currently, Amazon managed blockchain supports Hyperledger fabric framework and Ethereum is coming soon.
But if you want to use the Ethereum based blockchain service, Azure there for you. Azure Blockchain Service supports Ethereum. Hyperledger is yet to come.
Note: The term “chaincode” is equivalent to a “smart contract” for
Ethereum.
The good news with azure blockchain service is that you can use Azure Blockchain Development Kit for Ethereum VS Code extension to attach to a consortium, create, connect, build, and deploy smart contracts on Ethereum blockchain ledgers.
Coming to Amazon managed blockchain, follow below steps to Create a Hyperledger Fabric Blockchain Network, Install, Instantiate, Invoke, Query the chaincode, etc.
https://docs.aws.amazon.com/managed-blockchain/latest/managementguide/managed-blockchain-get-started-tutorial.html
Once you are done with the above steps, you can develop a REST API using Hyperleder fabric client SDK for Node.js to access your chaincode methods.
Below is the complete solution for amazon managed blockchain available in Github.
https://github.com/aws-samples/non-profit-blockchain