0

I have a dotnet core app that through a controller=>action makes an external request to a S3 bucket. In this way:

using (var client = new AmazonS3Client(credentials, Amazon.RegionEndpoint.EUSouth1))
{
   return await client.GetObjectAsync(request);
}

When I make a request to the end point that executes this code, I get a successful outcome on both Mac and Windows. The problem comes when I make a Linux container for the app (the goal is to deploy this container), in that case I get the following exception:

System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Can you help me?

Mino
  • 635
  • 10
  • 28
  • The linux image don't have the CA, so you must install yourself. Se [this related question](https://stackoverflow.com/questions/42292444/how-do-i-add-a-ca-root-certificate-inside-a-docker-image) – Max Sep 17 '20 at 19:52
  • thanks. Also as workaround I am using http. – Mino Sep 19 '20 at 06:19

0 Answers0