Facing issue while setting up discourse on my aws ec2 instance ubuntu20, ebs 30gb ram 1gb

How much swap have you added? You’ll need at least 2GB.

In general I feel Discourse now needs a 4GB VPS, but your mileage may vary …