Wanted to post an update as I have managed to solve it and it may help others.
When running the project from Visual Studio, the magic behind the scenes creates the developer self signed certificates and injects them into the kestrel web server.
When running in production this does not happen so you need to manually add the certificates. Ideally you should use production SSL certificates that are fully valid but in my case for AWS I could not as these were bound to the load balancers and not exportable.
What I did was:
ASPNETCORE_HTTPS_PORTS=8081 ASPNETCORE_Kestrel__Certificates__Default__Password=mycertificatepassword ASPNETCORE_Kestrel__Certificates__Default__Path=/app/Certificates/ProductionCertificate.pfx