Skip to content
GitHubXDiscord

Node

The Node resource lets you manage AWS ManagedBlockchain Nodes in your blockchain network. This resource allows you to create and configure nodes that participate in your managed blockchain.

Create a basic ManagedBlockchain Node with required properties and a common optional property.

import AWS from "alchemy/aws/control";
const blockchainNode = await AWS.ManagedBlockchain.Node("myBlockchainNode", {
MemberId: "myMemberId",
NetworkId: "myNetworkId",
NodeConfiguration: {
InstanceType: "BC.t3.medium",
AvailabilityZone: "us-east-1a"
}
});

Configure a node with additional properties such as a custom instance type and availability zone.

const advancedBlockchainNode = await AWS.ManagedBlockchain.Node("advancedBlockchainNode", {
MemberId: "myMemberId",
NetworkId: "myNetworkId",
NodeConfiguration: {
InstanceType: "BC.t3.large",
AvailabilityZone: "us-west-2b",
Framework: {
Name: "Hyperledger Fabric",
Version: "1.4"
}
}
});

Create a node that adopts an existing resource instead of failing if it already exists.

const adoptExistingNode = await AWS.ManagedBlockchain.Node("adoptNode", {
MemberId: "myMemberId",
NetworkId: "myNetworkId",
NodeConfiguration: {
InstanceType: "BC.t3.medium",
AvailabilityZone: "us-east-1a"
},
adopt: true
});

Demonstrate a node with a specific configuration including the framework settings.

const customNodeConfig = await AWS.ManagedBlockchain.Node("customNode", {
MemberId: "myMemberId",
NetworkId: "myNetworkId",
NodeConfiguration: {
InstanceType: "BC.t3.xlarge",
AvailabilityZone: "eu-central-1a",
Framework: {
Name: "Hyperledger Fabric",
Version: "2.2"
},
LoggingConfiguration: {
LogLevel: "INFO"
}
}
});