Hostname/IP does not match certificate’s altnames

Hi everyone I a stuck on kibana issue for the last 4 days . Read thru all resolutions however I am still stuck. Installed ELK on AWS instance Elasticsearch working fine seeing this -

However stuck on issue with kibana services here is the latest log down below-
I just had to stop and restart instance sonce then seeing this error -
oes not match certificate's altnames: IP: 50.17.74.55 is not in the cert's list: 172.31.16.231,
<>
[root@ip-172-31-16-231 certs]# tail -f -n 20 /var/log/kibana/kibana.log | grep -i error
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2024-09-16T16:02:54.203+00:00","message":"Email Service Error: Email connector not specified.","log":{"level":"INFO","logger":"plugins.notifications"},"process":{"pid":4022,"uptime":11.503475428},"trace":{"id":"2256eff18d69d90b2ecc930fcac2f1d0"},"transaction":{"id":"be40c3d6316cd61e"}}
{"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2024-09-16T16:03:05.511+00:00","message":"Unable to retrieve version information from Elasticsearch nodes. Hostname/IP does not match certificate's altnames: IP: 50.17.74.55 is not in the cert's list: 172.31.16.231, ::1, 127.0.0.1, fe80::8ff:fbff:fea2:44bb","log":{"level":"ERROR","logger":"elasticsearch-service"},"process":{"pid":4022,"uptime":22.8114745},"trace":{"id":"2256eff18d69d90b2ecc930fcac2f1d0"},"transaction":{"id":"be40c3d6316cd61e"}}`
<>

This is my kibana.yml -