This is just an FYI to help anybody else in the future.
We are in the process of switching our infrastructure from Linode to AWS, and since our forum doesn’t get much traffic, we figured it would make sense to try the smallest instance that meets the Discourse specifications (1GB of RAM) – so we tried a t2.micro instance with extra block storage.
It initially worked, loaded, and restored from backup. It was a little slow during initial testing. As soon as the DNS switched over and we started getting a little bit of traffic, our Discourse instance became completely unusable, with 504 Gateway errors or 502 errors almost every page load. The logs showed tons of timeouts, and the load was incredibly high.
Upgraded from t2.micro to t2.small and now everything is working great.
Lesson: t2.small is the bare minimum for Discourse on AWS.