Need help with --cli-input-json command #7585
-
I am working on a Amazon Managed Blockchain(AMB) project, as a first step, I have to create blockchain member and a network. I have followed the below AMB documentation to install it on my ec2 instance, but not getting the expected output. Input:- aws managedblockchain create-network --cli-input-json "{"Name":"OurBlockchainNet","Description":"OurBlockchainNetDesc","Framework":"HYPERLEDGER_FABRIC","FrameworkVersion": "2.2","FrameworkConfiguration":{"Fabric":{"Edition": "STARTER"}},"VotingPolicy": {"ApprovalThresholdPolicy": {"ThresholdPercentage": 50, "ProposalDurationInHours": 24, "ThresholdComparator": "GREATER_THAN"}}, “MemberConfiguration”: {"Name":"org1", "Description":"Org1 first member of network", "FrameworkConfiguration":{"Fabric":n{"AdminUsername":"MyAdminUser","AdminPassword":"Password123"}}, "LogPublishingConfiguration": {"Fabric":{"CaLogs":{"Cloudwatch": {"Enabled": true}}}}}}" Current output:- aws help Unknown options: member, of, network, FrameworkConfiguration:{Fabric:n{AdminUsername:MyAdminUser,AdminPassword:Password123}}, LogPublishingConfiguration: {Fabric:{CaLogs:{Cloudwatch: {Enabled: true}}}}}}, first Expected output:- AMB documentation:- https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-create-network.html I am not sure what's the correct way to use --cli-input-json, because its throwing error in every possible way that I have tried. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @adityasaurabh025, thanks for reaching out. Please note that the example you copied from is using placeholder parameters. You should definitely replace those, particularly the admin username and password with something more secure. Lastly, if you aren't using a region supported by AWS Managed Blockchain, you'll have to manually set a supported region using Hope that helps! Let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
Hi Ryan, Thanks for your suggestion. I have fixed the issue now, took some help from chatGPT😁 and its resolved now. Thanks again for your help! |
Beta Was this translation helpful? Give feedback.
Hi @adityasaurabh025, thanks for reaching out.
--cli-input-json
seems to be expecting a file name as a parameter. I was able to create a network using the commandaws managedblockchain create-network --cli-input-json file://test.json
, with my input file containing the code you pasted above, with a few typos fixed. You have the wrong type of parentheses surrounding "MemberConfiguration", and you have a lowercase 'n' before your admin credentials.Please note that the example you copied from is using placeholder parameters. You should definitely replace those, particularly the admin username and password with something more secure. Lastly, if you aren't using a region supported by AWS Manag…