You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The AWS Cloud Development Kit (CDK) is used to deploy a single node. An S3 bucket is utilized to store [User data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) and othether script and configuration files required when launching EC2 as the BSC Node.
17
+
2. A single RPC BSC Full node is deployed within in the [Default VPC](https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) continuously synchronizes with the rest of nodes on BSC Blockchain Network through [Internet Gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html).
18
+
3. The BSC node is accessed by dApps or development tools internally. JSON RPC API is not exposed to the Internet to protect the node from unauthorized access. dApps need to handle user authentication and API protection, like [in this example for dApps on AWS](https://aws.amazon.com/blogs/architecture/dapp-authentication-with-amazon-cognito-and-web3-proxy-with-amazon-api-gateway/).
19
+
4. The BSC node send various monitoring metrics for both EC2 and BSC client to Amazon CloudWatch.
20
+
21
+
### Highly Available setup
14
22
15
23

16
24
17
-
1. The AWS Cloud Development Kit (CDK) deploys the highly available (HA) architecture built with stacks, as shown in the diagram above. An S3 bucket is utilized to store the execution scripts required when launching EC2 as the BSC Node and is updated through [User data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).
25
+
1. The AWS Cloud Development Kit (CDK) is used to deploy highly available (HA) architecture. An S3 bucket is utilized to store [User data](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) and othether script and configuration files required when launching EC2 as the BSC Node.
18
26
2. A set of RPC BSC Fullnodes are deployed within the [Auto Scaling Group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html) in the [Default VPC](https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) continuously synchronizes with the rest of nodes on BSC Blockchain Network through [Internet Gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html).
19
27
3. The BSC nodes are accessed by dApps or development tools internally through [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html). JSON RPC API is not exposed to the Internet to protect nodes from unauthorized access. dApps need to handle user authentication and API protection, like [in this example for dApps on AWS](https://aws.amazon.com/blogs/architecture/dapp-authentication-with-amazon-cognito-and-web3-proxy-with-amazon-api-gateway/).
20
28
4. The BSC nodes send various monitoring metrics for both EC2 and BSC nodes to Amazon CloudWatch.
@@ -58,7 +66,7 @@ This is the Well-Architected checklist for BSC nodes implementation of the AWS B
> You may see the following error if the default VPC already exists: `An error occurred (DefaultVpcAlreadyExists) when calling the CreateDefaultVpc operation: A Default VPC already exists forthis accountin this region.`. That means you can just continue with the following steps.
90
98
91
99
92
-
3. Configure and deploy multiple HA Nodes
100
+
3. Configure the CDK app
93
101
94
-
Create your own copy of `.env` file and edit it to update with your AWS Account ID, AWS Region, BSC SNAPSHOTS URI:
102
+
Create your own copy of `.env` file and edit it to update with your AWS Account ID, AWS Region, and optionally the BSC SNAPSHOTS URI:
95
103
96
104
```bash
97
105
# Make sure you are in aws-blockchain-node-runners/lib/bsc
98
106
cd lib/bsc
99
-
npm install
100
107
pwd
101
108
cp ./sample-configs/.env-sample-full .env
102
109
vim .env
103
110
```
104
111
>**IMPORTANT**:
105
-
> 1. Example configuration parameters are setin the local`.env-sample` file. You can find more examples inside `sample-configs` directory.
106
-
> 2. Please check this GitHub: https://github.com/48Club/bsc-snapshots, use Geth full node link replace the `BSC_SNAPSHOTS_URI`.
112
+
> 1. If you want to set your own `BSC_SNAPSHOTS_URI`, check this GitHub: https://github.com/48Club/bsc-snapshots, and use Geth full node link.
# Make sure you are in aws-blockchain-node-runners/lib/bsc
267
273
274
+
# Undeploy Single Node
275
+
cdk destroy bsc-single-node
276
+
268
277
# Undeploy HA Nodes
269
278
cdk destroy bsc-ha-nodes
270
279
@@ -276,7 +285,9 @@ cdk destroy bsc-common
276
285
277
286
### FAQ
278
287
279
-
1. How to check the logs of the clients running on my sync node? Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
288
+
1. How to check the logs of the clients running on my sync node?
289
+
290
+
Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
280
291
281
292
**Note:** In this tutorial we chose not to use SSH and use Session Manager instead. That allows you to log all sessions in AWS CloudTrail to see who logged into the server and when. If you receive an error similar to `SessionManagerPlugin is not found`, [install Session Manager plugin for AWS CLI](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
2. How to check the logs from the EC2 user-data script? Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
304
+
2. How to check the logs from the EC2 user-data script?
305
+
306
+
Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
3. How can I check the BSC service log on EC2? Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
318
+
3. How can I check the BSC service log on EC2?
319
+
320
+
Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
306
321
307
322
```bash
308
323
pwd
@@ -316,7 +331,9 @@ cd /data
316
331
cat bsc.log
317
332
```
318
333
319
-
4. How can I restart the BSC service? Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
334
+
4. How can I restart the BSC service?
335
+
336
+
Please enter the [AWS Management Console - EC2 Instances](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:instanceState=running), choose the correct region, copy the instance ID you need to query.
0 commit comments