Home >Backend Development >Golang >How to Fix AWS SES \'x509: certificate signed by unknown authority\' Error?

How to Fix AWS SES \'x509: certificate signed by unknown authority\' Error?

Patricia Arquette
Patricia ArquetteOriginal
2024-11-24 03:55:151015browse

How to Fix AWS SES

Resolving AWS SES Error: x509: Certificate Signed by Unknown Authority

While attempting to deploy to a staging environment, you may encounter an error stating "Post https://email.us-east-1.amazonaws.com/: x509: certificate signed by unknown authority." This error indicates that the certificate used for TLS/SSL verification is not recognized by the system.

Solution: Install Root Certificates

In Alpine Linux Docker images, the necessary root certificates are not included by default. To resolve this error, add the following lines to your Dockerfile:

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 installing the root certificates, the system will be able to verify the certificate used by AWS SES, allowing emails to be sent successfully.

The above is the detailed content of How to Fix AWS SES \'x509: certificate signed by unknown authority\' Error?. 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