First you will need to export an environment variable with the AWS account ID of
the member who will be the Supplier. Do that by typing the following command in
the Cloud9 terminal, replacing 123456789012
with the actual account ID of the
Supplier. If you are working in another region, substitute it for us-east-1
.
export AWS_DEFAULT_REGION=us-east-1
export SUPPLIER_AWS_ID=123456789013
Make sure you put the Supplier’s AWS ID in the command above and not the Retailer’s! It should be a different ID from the account you’re currently interacting with.
Then execute the following commands in the Retailer’s Cloud9 terminal to invite the Supplier to join the network:
export NETWORKID=$(aws managedblockchain list-networks | jq -r '.Networks[] | select(.Name == "SupplyChain").Id')
export MEMBERID=$(aws managedblockchain list-members --network-id=$NETWORKID | jq -r '.Members[] | select(.Name == "Retailer") | .Id')
aws managedblockchain create-proposal --network-id=$NETWORKID --member-id=$MEMBERID --actions Invitations=[{Principal=$SUPPLIER_AWS_ID}]
If the command executed successfully, you should see output similar to this:
{
"ProposalId": "p-N5KHU53A4FACDJ377F56IRW7P4"
}