Hosting a web server on AWS, subdomain hosted on cloudflare now 522 error suddenly

Webserver is on AWS was working fine for years.
last night we began to see only 522 errors when trying to access.
it is a subdomain of a site hosted here on cloudflare.
Nothing was changed by us on either end.
Can ssh into the webserver, ports 22,80,443 open on the webserver.
What has happened and what can we do to fix?

Thanks in advance