Giter Club home page Giter Club logo

menoprog / amazon-managed-blockchain-document-ledger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-managed-blockchain-document-ledger

0.0 0.0 0.0 344 KB

Code to deploy a complete Amazon Managed Blockchain solution that can write and read documents to Hyperledger Fabric via API Gateway and Lambda interfaces, plus Hyperledger Explorer for visualizing the blockchain network and its contents.

License: MIT No Attribution

JavaScript 20.66% Shell 41.27% TypeScript 37.73% Dockerfile 0.34%

amazon-managed-blockchain-document-ledger's Introduction

Managed Blockchain Document Ledger

Code to deploy a complete Amazon Managed Blockchain solution that can write and read documents to Hyperledger Fabric via API Gateway and Lambda interfaces, plus Hyperledger Explorer for visualizing the blockchain network and its contents.

Architecture

Architecture Diagram

Prerequisites

All the deployment steps below should be executed in a Cloud9 instance. See Getting started with AWS Cloud9 for instructions on how to set one up. It is recommended to use an instance type of m5.large for this instance, otherwise leave defaults can be left as-is.

Once the instance is created, open the IDE, and enter the following commands in the terminal.

git clone https://github.com/aws-samples/amazon-managed-blockchain-document-ledger
cd amazon-managed-blockchain-document-ledger

Deployment

Initial Setup

export LEDGER_DOMAIN_NAME="ledger.example.com"
scripts/install-prerequisites.sh
scripts/get-cloud9-data.sh

Foundation

cdk deploy FoundationStack
scripts/get-nameservers.sh

Hyperledger Components

cdk deploy LedgerStack
scripts/get-ledger-data.sh

Interface Components

scripts/configure-lambdas.sh
cdk deploy InterfaceStack

During the above phase, if a custom DNS hostname is being used, the deployment will wait while verification is conducted. For this to occur, DNS delegation must be completed to the api and explorer subdomains. Run scripts/get-nameservers.sh to view the nameservers to delegate to for each domain.

Hyperledger Configuration

scripts/configure-ledger.sh
scripts/configure-chaincode.sh

Hyperledger Explorer

scripts/configure-explorer.sh
cdk deploy ExplorerStack
scripts/initialize-explorer.sh

Now click on Preview button in Cloud 9 IDE, and select Preview Running Application, then pop out into new browser tab with icon in upper-right of preview panel.

Testing

tests/get-documents.sh
tests/get-document.sh id
tests/post-document.sh path/to/document/file
tests/put-document.sh id path/to/document/file
tests/delete-document.sh id

If successful, the above returns a JSON document with a documentId unique to this record (can be used to fetch it using the reader Lambda) and the transactionId that stored the document on the blockchain.

References

Contributing

Pull requests are welcomed. Please review the Contributing Guidelines and the Code of Conduct.

Security

See CONTRIBUTING for more information.

Authors

License

This project is licensed under the MIT-0 License. See the LICENSE file for details.

amazon-managed-blockchain-document-ledger's People

Contributors

lordjabez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.