Subgraph failing deployment in Amazon EC2 Instance

I want to run graph-node (The Graph) in an Amazon EC2 Instance.

I have setup everything with docker-compose and the 3 containers (graph-node, ipfs and postgres) are running smoothly.

I have also setup my own version of a subgraph, based on the Open Zeppelin's implementation (@openzeppelin/subgraphs).

The problem arises when I want to deploy the subgraph by running the following command:

graph deploy --ipfs http://localhost:5001 --node http://localhost:8020 generated/sample ./generated/sample.subgraph.yaml

I am getting:

*** stack smashing detected ***: terminated Aborted (core dumped)

My EC2 Instance has 8 vCPUs and 32 GiB RAM. This is double what I have on my localhost and where it worked perfectly.

You should ask about this in a channel specific to The Graph. Even though we maintain OpenZeppelin Subgraphs, we are not familiar with running indexers.