Home >Backend Development >Golang >How to Fix the \'x509: Certificate Signed by Unknown Authority\' Error in AWS SES?

How to Fix the \'x509: Certificate Signed by Unknown Authority\' Error in AWS SES?

Linda Hamilton
Linda HamiltonOriginal
2024-12-01 00:13:11294browse

How to Fix the

Troubleshooting AWS SES Error: "x509: Certificate Signed by Unknown Authority"

Encountering the "x509: certificate signed by unknown authority" error when using Amazon Simple Email Service (SES) from a staging environment can be frustrating. This error indicates that the certificates used for SSL/TLS encryption are not recognized by the server.

To resolve this issue, ensure that the root certificates are properly installed in your staging environment. Docker images based on lightweight distributions such as Alpine Linux require manual installation of root certificates.

For example, if you're using the Alpine Docker image:

FROM alpine:3.6 as alpine

RUN apk add -U --no-cache ca-certificates

FROM scratch
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

By adding the root certificates to the system, the server will be able to verify the certificates used by SES and allow the email sending process to complete successfully.

The above is the detailed content of How to Fix the \'x509: Certificate Signed by Unknown Authority\' Error in AWS SES?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn