Home > Backend Development > Golang > Why Does My AWS SES Send Fail with \'x509: certificate signed by unknown authority\'?

Why Does My AWS SES Send Fail with \'x509: certificate signed by unknown authority\'?

Linda Hamilton
Release: 2024-11-25 07:25:13
Original
959 people have browsed it

Why Does My AWS SES Send Fail with

AWS SES Error: Unable to Send Emails Due to Unknown Certificate Authority

When attempting to send emails through Amazon Simple Email Service (SES) using an AWS access key and secret, users may encounter an error message stating:

Post https://email.us-east-1.amazonaws.com/: x509: certificate signed by unknown authority
Copy after login

Root Cause

This error occurs when the deployed environment lacks access to valid root certificates for validating the certificate chain used by the SES endpoint.

Solution

To resolve this issue, ensure that the deployed environment has access to root certificates by incorporating them into your application image. Here's an example using the Alpine Linux 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/
Copy after login

After adding the root certificates, the email sending functionality through SES should operate as intended.

The above is the detailed content of Why Does My AWS SES Send Fail with \'x509: certificate signed by unknown authority\'?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template