Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to leverage Amazon Managed Blockchain for your project?

Marc
October 10, 2019

How to leverage Amazon Managed Blockchain for your project?

In this workshop, I’ll show how you can build a Hyperledger Fabric network using the Amazon Managed Blockchain. I will then deploy a chaincode – or smart contract – that tracks donations to NGOs, and an API server that exposes the chaincode’s functions. Finally, I will run a UI application that uses the RESTful API to interact with the Fabric network.

Marc

October 10, 2019
Tweet

More Decks by Marc

Other Decks in Technology

Transcript

  1. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Jean-Robin Foehn – Solutions Architect Amazon Managed Blockchain @ Station F October, 2019
  2. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Table of contents • Introduction to Amazon Managed Blockchain • How it works • Workshop
  3. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Introducing Amazon Managed Blockchain
  4. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Blockchain networks are hard to create • Building a scalable blockchain network with existing technologies is complex to set up and hard to manage • To create a blockchain network, each network member needs to manually provision hardware, install software, create and manage certificates for access control, and configure networking components • Once the blockchain network is running, you need to continuously monitor the infrastructure and adapt to changes, such as an increase in transaction requests, or new members joining or leaving the network
  5. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark What is Amazon Managed Blockchain? Amazon Managed Blockchain is a fully managed service that makes it easy to quickly create and manage scalable blockchain networks using two popular open source blockchain frameworks: Hyperledger Fabric and Ethereum.
  6. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Amazon Managed Blockchain features Low cost Only pay for resources used Open-source variety Support for two frameworks Integrated Send data to Amazon QLDB for secure analytics Fully managed Create a blockchain network in minutes Reliable & scalable Backed with Amazon QLDB technology Decentralized Democratically govern the network
  7. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Customers are experimenting with many possibilities Proof of Ownership Digital Security Trading Documents/Contracts Enterprise Platforms Financial Insurance Mortgage Loans Voting Mechanisms Patient Records Corporate Governance HCLS Real Estate Legal Agriculture Gaming M & E Transportation Digital Advertising Power/Utilities Retail Capital Markets Cloud OWNERSHIP PRIVATE MARKETS DERIVATIVES WAGERS GLOBAL PAYMENTS REMITTANCE NOTARISATION EQUITY MICROFINANCE INTELLECTUAL PROPERTY TITLE RECORD ESCROW DIGITAL RIGHTS E-COMMERCE DEBT CROWDFUNDING P2P LENDING HEALTHCARE VOTING TRUSTEES SMART CONTRACTS DIGITAL CURRENCY SECURITIES RECORD KEEPING BLOCKCHAIN TECHNOLOGY
  8. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Customer use cases • Peer-to-peer asset transfers • Cross-border payments • Clearing and settlement process and for supply chain • Track ownership and provenance of physical and digital assets from manufacturer/creator to the consumer • Maintain data efficiency and integrity without needing a 3rd party intermediary
  9. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Public and permissioned networks Public networks allow anyone to participate in the network. Members are incentivized to maintain the network. Permissioned networks limit the members to known entities.
  10. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark How Amazon Managed Blockchain Works?
  11. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Hyperledger Fabric
  12. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Hyperledger Fabric Ordering Service (Orderer) Fabric Certificate Authority Member A Peer Node Fabric Certificate Authority Member B Peer Node Fabric Certificate Authority Member C Peer Node Fabric Certificate Authority Member D Peer Node Amazon VPC AWS PrivateLink VPC Endpoint Fabric Client Node Fabric Network managed by Amazon Managed Blockchain VPC Member A Member A VPC Endpoint Fabric Client Node VPC Member B Member B VPC Endpoint Fabric Client Node VPC Member C Member C VPC Endpoint Fabric Client Node VPC Member D Member D Fabric Network Organization Certificate Authority Membership Service Provider Peer Node Fabric CLI Orderer Architecture
  13. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Hyperledger Fabric • Create permissioned networks with channels to limit the transactions on the ledger each member can see • Chaincode (smart contracts) written in Go, Node, and Java, and executed in Docker containers • Validation policy for executing chaincode is configurable • Does not require a native cryptocurrency for chaincode execution
  14. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Chaincode basics Code executed on the network, and can query and update ledger Fabric supports chaincode in three languages: Chaincode execute within a docker container on peer nodes Chaincode has two operations in its interface: • Init()—initializes the chaincode with parameters • Invoke()—invokes the chaincode with parameters
  15. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Peer nodes Ordering service blob3 blckNo tx1 tx2 Block forming blob1 Verify endorsement, readset If OK then apply writeset Else invalid transaction (blob) Genesis block Submitting client Peer Validated Ledger (VL) PeerLedger Peer Ledger Validated Ledger Block Block seqNo=blckNo 3 4 seqNo blob1 blob2 Orders • Stores a copy of the ledger database • Executes chaincode and endorses transactions • Validates transactions before the final commit to ledger
  16. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Transaction flow with Hyperledger Fabric Verify policy Peer-1 Peer-n Transaction simulation Ordering service Submitting client 2 5 6 Transaction delivery to peers Transaction proposal 1 Endorsement signature 3 Broadcast endorsement 4
  17. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Channels for access control Channels allow isolation of transactions among specific members in the network Create or update a channel with configuration transaction (configtx) Member 1 Member 2 Member 3 Channel 2 Ledger Channel 1 Ledger Hyperledger Fabric ordering service Channel 2 Channel 1 Member 2 Peer Member 3 Peer Member 1 Peer
  18. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark Workshop
  19. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Workshop Objectives The objective of this workshop is to create an AWS Managed Blockchain Fabric network, then deploy an application that interacts with the Fabric network. You will do the following: • Create an AWS Managed Blockchain Fabric network • Create a peer node in the network • Create a new channel, install and instantiate chaincode • Query the chaincode and invoke transactions • Deploy a RESTful API which connects to the Fabric network and exposes the chaincode functions as REST endpoints • Test the RESTful API using cURL • Deploy a Node.js application that calls the RESTful API
  20. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Layers you will build in this workshop: 1. Hyperledger Fabric network & chaincode that executes on the Fabric peer node. 2. A RESTful API that uses the Hyperledger Fabric Client SDK to interact with the Fabric network 3. A user interface application that calls the API Workshop layered architecture Interact with application Use REST resources Connect via Fabric SDK RESTful API
  21. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Workshop GitHub repository Workshop tutorial: https://tinyurl.com/y7h6369b (https://github.com/aws-samples/non-profit-blockchain)
  22. © 2018, Amazon Web Services, Inc. or its Affiliates. All

    rights reserved. Amazon Confidential and Trademark Thank you!