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.
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!