

# Accept an Invitation to Create a Member and Join a Hyperledger Fabric Network on Amazon Managed Blockchain (AMB)
<a name="managed-blockchain-hyperledger-member"></a>

In Amazon Managed Blockchain (AMB), a member is a distinct identity within the Hyperledger Fabric network associated with an AWS account. An AWS account can have multiple members on the network. Every member in a network must be invited to participate through a proposal made by an existing member and approved according to the network's voting policy. The exception is the first member, which is created along with the network. For more information, see [Work with Proposals for a Hyperledger Fabric Network on Amazon Managed Blockchain (AMB)](managed-blockchain-proposals.md). After the invitation is approved, the invited AWS account can create a member and join the network using the invitation ID.

Each member pays an hourly rate, billed per second, for their network membership, peer nodes, and peer node storage. Charges also apply to the amount of data written to the network. Charges may vary depending on the network edition selected when the network was created. For more information, see [Amazon Managed Blockchain (AMB) Pricing](https://aws.amazon.com/managed-blockchain/pricing/hyperledger). The resources associated with a member's account depend on the specific blockchain framework and application requirements, but each member must have the following resources:
+ **An interface VPC endpoint in the account**–AMB Access is a PrivateLink-powered service, so you must have an interface VPC endpoint in your account to communicate with the service endpoint that the AMB Access network makes available. For more information, see [Create an Interface VPC Endpoint for Amazon Managed Blockchain (AMB) Hyperledger Fabric](managed-blockchain-endpoints.md) and [Key Concepts: Amazon Managed Blockchain (AMB) Networks, Members, and Peer Nodes](network-components.md).
+ **One or more peer nodes**–Each member must have at least one peer node to actively participate in the blockchain network. When you create a member it has no peer nodes by default. You create peer nodes after you create the member. Peer nodes run on AMB Access instances. Custom Amazon EC2 instances or on-premises instances cannot participate as peer nodes on a Hyperledger Fabric network on AMB Access. For more information, see [Work with Hyperledger Fabric Peer Nodes on AMB Access](managed-blockchain-hyperledger-peer-nodes.md).

**Topics**
+ [Work with Invitations](accept-invitation.md)
+ [Create a Member](managed-blockchain-hyperledger-create-member.md)

# Work with Invitations
<a name="accept-invitation"></a>

If you are invited to join a Hyperledger Fabric network on Amazon Managed Blockchain (AMB), you can accept the invitation by creating a member using the invitation ID. You can also reject the invitation. After you reject an invitation, the invitation ID is no longer valid. A new invitation proposal must be approved, and a new invitation ID is required to create a member. If don't accept or reject an invitation before it expires, the invitation lapses. As with a rejected invitation, a new invitation ID is required.

You can see all pending, accepted, and rejected invitations for your AWS account in the AWS Management Console. Alternatively, you can use the AWS CLI or the AMB Access SDK [ListInvitations](https://docs.aws.amazon.com/managed-blockchain/latest/APIReference/>API_ListInvitedNetworks.html) action.

You can set up Amazon CloudWatch Events along with Amazon Simple Notification Service so that you receive an alert when there is an invitation for your account. For more information, see [Automating AMB Access Proposal Notifications with CloudWatch Events](automating-proposals-with-cloudwatch-events.md).

## To list blockchain network member invitations for your AWS account using the console
<a name="w2aac17c13b9b1"></a>

1. Open the AMB Access console at [https://console.aws.amazon.com/managedblockchain/](https://console.aws.amazon.com/managedblockchain/).

1. Choose **Invitations**, and then do one of the following:    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/accept-invitation.html)

## To list blockchain network member invitations for your AWS account using the AWS CLI
<a name="w2aac17c13b9b3"></a>
+ Use the following command:

  ```
  aws managedblockchain list-invitations
  ```

  The command returns a list of invitations, along with detail for each invitation, as shown in the following example for an invitation in the `PENDING` status:

  ```
  {
     "Invitations": [ 
        { 
           "CreationDate": 2019-04-08T23:40:20.628Z,
           "ExpirationDate": 2019-04-09T23:40:20.628Z,
           "InvitationId": "i-XL9MDD6LVWWDNA9FF94Y4TFTE",
           "NetworkSummary": { 
              "CreationDate": 2019-04-03T13:15:22.345Z,
              "Description": "Test network for supply chain blockchain.",
              "Framework": "HYPERLEDGER_FABRIC",
              "FrameworkVersion": "2.2",
              "Id": "n-MWY63ZJZU5HGNCMBQER7IN6OIU",
              "Name": "Example Corp.",
              "Status": "AVAILABLE"
           },
           "Status": "PENDING"
        }
     ]
  }
  ```

You can use the `InvitationID` with the `create-member` command to create a member and join the network. For next steps, see [Create a Member and Join a Network](managed-blockchain-hyperledger-create-member.md).

# Create a Member and Join a Network
<a name="managed-blockchain-hyperledger-create-member"></a>

You can use the AMB Access console, the AWS CLI, or the AMB Access SDK [CreateMember](https://docs.aws.amazon.com/managed-blockchain/latest/APIReference/>API_CreateMember.html) action to create a member in a network that your account is invited to. If you created the network, you create the first member when you create the network. All subsequent members must be invited to join by way of a member proposal.

After you create the member, for the member to be functional on the network, your account must have a VPC endpoint associated with the VPC endpoint service name published by the network. For more information, see [Create an Interface VPC Endpoint for Amazon Managed Blockchain (AMB) Hyperledger Fabric](managed-blockchain-endpoints.md). You also must create at least one peer node in your membership. For more information, see [Work with Hyperledger Fabric Peer Nodes on AMB Access](managed-blockchain-hyperledger-peer-nodes.md).

## To accept an invitation to create a member and join a network using the AWS Management Console
<a name="w2aac17c15b9b1"></a>

1. Open the AMB Access console at [https://console.aws.amazon.com/managedblockchain/](https://console.aws.amazon.com/managedblockchain/).

1. From the navigation pane, choose **Invitations**.

1. Select the invitation that you want to accept from the list, and then choose **Accept invitation**. To view more information about the network you are invited to join, choose the network **Name** from the list

1. Under **Create member and join network**, configure your network member according to the following guidelines:

   1. Enter a **Member name** that will be visible to all members and an optional **Description**.

   1. Under **Hyperledger Fabric certificate authority (CA) configuration** specify a username and password to be used as the administrator on the Hyperledger Fabric CA. Remember the user name and password. You need them later any time that you create users and resources that need to authenticate.

1. Choose **Create member and join network**.

## To accept an invitation to create a member and join a network using the AWS CLI
<a name="w2aac17c15b9b3"></a>
+ Use the `create-member` command similar to the example below. Replace the value of `--network-id` with the Network ID that you are joining and `--invitation-id` with the Invitation ID sent to your account from the network.

  ```
  aws managedblockchain create-member \
  --network-id n-MWY63ZJZU5HGNCMBQER7IN6OIU \
  --invitation-id i-XL9MDD6LVWWDNA9FF94Y4TFTE \
  --member-configuration 'Name=org2,Description=MyMemberDesc,\
  FrameworkConfiguration={Fabric={AdminUsername=MyAdminUsername,\
  AdminPassword=Example-Password123}}'
  ```

  The command returns output similar to the following:

  ```
  {
  "MemberId": "m-J46DNSFRTVCCLONS9DT5TTLS2A"
  }
  ```

After you create the member, you can use the `get-member` command to return important details about the member configuration.