AWS ECS (Fargate)
The AWS ECS (Fargate) provider runs GoFabric and GoBesu components as Fargate tasks in your AWS account. There are no virtual machines to set up: GoInfra deploys each component as an ECS service and exposes it through a Network Load Balancer.
- Choosing How to Get a Cluster
- Creating a New Cluster
- Using an Existing Cluster
- AWS Credentials
- What Runs on ECS
- Deleting an ECS Infra
Choosing How to Get a Cluster
Open GoInfra, click + New Infra and select AWS ECS (Fargate). The Cluster section offers two options:
| Option | What GoChain does |
|---|---|
| Create a new cluster | Creates a dedicated cluster with its VPC, subnets, Network Load Balancer, EFS file system, IAM roles and Cloud Map namespace, and deletes them all when the Infra is deleted. |
| Use an existing cluster | Connects a cluster you already run, with its network, load balancer, roles and Cloud Map namespace. GoChain deploys into it, but never creates or deletes these resources. |
Both options ask for a Name for the Infra, the AWS Region and AWS credentials.
ℹ️ Note: Creating an ECS Infra streams its provisioning steps as an operation. Follow the progress on the Infra page or on the Operations page.
Creating a New Cluster
Fill in the names GoChain gives the resources it creates. They must be unique within the account and region.
- Cluster Name (required): Name of the ECS cluster to create.
- VPC Name (required): Name of the VPC to create for the cluster.
GoChain creates the rest from these names. The Infra is ready when the operation finishes.
The info button next to the Cluster heading lists the AWS resources GoChain creates. For a new cluster:
- A VPC (
10.0.0.0/16), unless one with the given name already exists. - Two public and two private subnets, in two Availability Zones, with an internet gateway and route tables.
- Two NAT gateways, one per zone, each with an Elastic IP.
- The ECS cluster, running tasks on Fargate.
- An internet-facing Network Load Balancer with two Elastic IPs.
- Security groups for the tasks and for the file system.
- An encrypted EFS file system, with a mount target in each private subnet.
- Two IAM roles: the task execution role and the task role.
- A Cloud Map private DNS namespace,
<cluster name>.local.
Each component you deploy then adds an ECS service and its task definition, a load balancer listener and target group per exposed port, an EFS access point, a CloudWatch log group and a Cloud Map service. With an existing cluster, GoChain creates only these per-component resources.
⚠️ Quotas and costs: A new cluster uses 1 VPC and 4 Elastic IPs in the region. AWS allows 5 of each per region by default, so check your quotas before you create the Infra; when either is exhausted, the creation fails. NAT gateways, the load balancer, Elastic IPs, running tasks and stored data are billed by AWS, even when idle.
Using an Existing Cluster
Use this option when your organization manages the AWS network itself. Create the resources below first; GoInfra checks the cluster and the load balancer and stores the rest.
Existing ECS Cluster
- Cluster Name (required): Name or ARN of an active cluster.
- VPC ID (required): The VPC where the load balancer's target groups are created (
vpc-…). - Private Subnet IDs (required): Where tasks run, separated by commas (
subnet-…). Use one per Availability Zone. - Security Group ID (required): Attached to every task (
sg-…). GoInfra adds an inbound rule from the VPC's CIDR for each component port and does not remove these rules.
Load Balancer
- Network Load Balancer ARN (required): The load balancer that exposes components. GoInfra adds a listener and a target group for each exposed port, so dedicate it to this Infra. Cross-zone load balancing must be on.
- Load Balancer DNS Name (required): The address every component advertises.
Roles, Service Discovery and Storage
- Task Execution Role ARN (required): Used by ECS to pull images and write logs.
- Task Role ARN (required): The identity the components run with.
- Cloud Map Namespace ID (required): A private DNS namespace in the cluster's VPC (
ns-…). - Cloud Map Namespace Name (required): Components reach each other at
<service>.<namespace name>. - EFS File System ID (optional, strongly recommended): Persistent storage for components (
fs-…).
⚠️ Warning: Without an EFS file system, components keep no data across restarts. A restarted peer or orderer loses its ledger.
AWS Credentials
Both options take an AWS Access Key and Secret Key. GoInfra calls the AWS APIs directly to deploy components, so the keys need:
- New cluster: permissions over ECS, EC2/VPC, Elastic Load Balancing, EFS, IAM and Cloud Map.
- Existing cluster: permissions over ECS services and task definitions, Elastic Load Balancing listeners and target groups, EFS access points, Cloud Map services, EC2 security group rules, and
iam:PassRoleon the two task roles.
What Runs on ECS
After the Infra is ready, select it as the host when you create components. There is no VM setup step.
GoFabric
- Organizations, peers, orderers, CCAPI and GoInitus run as ECS services.
- Chaincode runs as a service (Chaincode-as-a-Service) and must be deployed from a pre-built image. Building chaincode from source is not available on ECS. See deploying from a pre-built image.
- The CCAPI serves plain HTTP on its load balancer port; GoInitus reaches it at
http://<host>:<port>. - A business group cannot mix engines: all its organizations run on ECS, all on Kubernetes, or all on Docker hosts (virtual machines). Inviting an organization from another engine fails.
GoBesu
- ECS Infras appear in the GoBesu host lists, and Besu nodes and the ETH API run as ECS services.
Deleting an ECS Infra
Delete the organizations and nodes that run on the Infra first. Deleting a component removes its ECS service and task definitions. Then delete the Infra from its page.
- New cluster: GoChain removes everything it created for the Infra: the cluster, load balancer, NAT gateways and their addresses, EFS file system, Cloud Map namespace, subnets, route tables, internet gateway, security group, VPC and IAM roles. If a step fails, the Infra is kept so that the deletion can be retried.
- Existing cluster: GoChain removes only the Infra record. Nothing in your AWS account is deleted. The inbound rules GoInfra added to the security group stay; remove them yourself if you no longer need them.