- Newest
- Most votes
- Most comments
Issue is on the nuget side. You can check their status page
answered a year ago
The issue you're experiencing with SSL connection errors in AWS CodeBuild when trying to retrieve packages from CodeArtifact or nuget.org is not uncommon and can occur due to various reasons. The error messages you're seeing, particularly the SSL connection failure and the remote certificate validation error, suggest there might be an issue with the SSL/TLS handshake between CodeBuild and the package repositories.
Given that this problem started occurring recently and affects both Windows Server 2019 and Amazon Linux environments, it's possible that there's been a change in the CodeBuild environment or the package repositories' SSL certificates.
Here are a few steps you can try to resolve this issue:
-
Ensure that your CodeBuild project's IAM role has the necessary permissions to access CodeArtifact. The role should have permissions for actions like "codeartifact:GetAuthorizationToken", "codeartifact:GetRepositoryEndpoint", and "codeartifact:ReadFromRepository".
-
If you're using CodeArtifact, make sure you're using the CodeArtifact Credential Provider in your buildspec.yaml file. This should be configured in the pre_build section to allow NuGet CLI tool commands to run correctly.
-
Check if there have been any recent changes to your project's buildspec or NuGet configuration that might affect package resolution.
-
Try clearing the NuGet cache as part of your build process. You can do this by adding a command like "nuget locals all -clear" to your buildspec.
-
Ensure that your CodeBuild project is using the latest version of NuGet. CodeArtifact supports NuGet 4.8 and higher, so using an older version could cause issues.
-
If the problem persists, you may need to contact AWS support to check if there are any known issues with CodeBuild or CodeArtifact that could be causing this problem.
Remember, SSL/TLS issues can sometimes be transient, so if the problem doesn't occur consistently, it might resolve itself. However, if it continues, these steps should help you troubleshoot and potentially resolve the issue.
Sources
NuGet compatibility - CodeArtifact
Using NuGet packages in CodeBuild - CodeArtifact
we're experiencing the same issue throughout the day today. thinking it was a Zscaler certificate issue initially.
logs from our codebuild project included below.
2025-05-13T15:21:38.742Z Determining projects to restore...
Determining projects to restore... 2025-05-13T15:21:40.754Z Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/mailkit/index.json'.
Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/mailkit/index.json'. 2025-05-13T15:21:40.754Z The SSL connection could not be established, see inner exception.
The SSL connection could not be established, see inner exception. 2025-05-13T15:21:40.754Z The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch
answered a year ago
Relevant content
asked 4 years ago
asked 2 years ago
- AWS OFFICIALUpdated 9 months ago

Thank you! I checked their status page at the time of my post and there were no issues reported either there, or on the AWS page. I'll wait until their status page gives the all clear, then I'll try another build. If the build succeeds after their issue is resolved. I'll accept your answer.