简体   繁体   English

AWS SES 错误:x509:由未知授权机构签署的证书

[英]AWS SES Error: x509: certificate signed by unknown authority

I've been banging my head against the table with this one for a while now.我用这个把头撞在桌子上已经有一段时间了。 I'm.我是。 I've successfully sent emails locally using an AWS access key and secret that has full access.我已经使用具有完全访问权限的 AWS 访问密钥和机密在本地成功发送了电子邮件。 Once I deploy to my staging environment I get an error using the same access key and secret.部署到暂存环境后,使用相同的访问密钥和密码时会出现错误。

RequestError: send request failed\ncaused by: Post https://email.us-east-1.amazonaws.com/: x509: certificate signed by unknown authority

Please help!请帮忙!

If you are using alpine docker image for example: 例如,如果您使用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/

After adding root certificates ca-certificates , it will be working fine. 添加根证书ca-certificates ,它将可以正常工作。

My project is deployed on Ubuntu machine and I am using Golang, so here is my Dockerfile.我的项目部署在 Ubuntu 机器上,我使用的是 Golang,所以这是我的 Dockerfile。

Please note that I have used COPY command twice.请注意,我已经使用了两次COPY命令。 I successfully deployed my project and its working as expected.我成功部署了我的项目并按预期工作。

FROM golang:1.16.5 AS builderStep

# Install Certificate
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates

FROM scratch AS app

# Copy Certificate
COPY --from=builderStep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

COPY --from=builderStep /my/source/code/ .

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Aurora PostgreSQL - x509:由未知机构签署的证书 - AWS Aurora PostgreSQL - x509: certificate signed by unknown authority x509:由未知机构使用 AWS IoT 签署的证书 - x509: certificate signed by unknown authority using AWS IoT AWS Batch、AWS ECR:Docker 运行给出错误 x509:证书由未知机构签名 - AWS Batch, AWS ECR : Docker run gives an error x509: certificate signed by unknown authority 尝试向 websocket 发布响应时,AWS API 网关“x509:由未知机构签名的证书” - AWS API Gateway “x509: certificate signed by unknown authority” when trying to post a response to a websocket 发送请求失败,带有未知授权机构签名的X509地形 - Send request failed in terraform with x509 signed by unknown authority 获取 https://api.[mycluster]/api?timeout=32s: x509: 由未知权威签名的证书,使用 kops 和 Travis-CI 在 AWS 上创建的 Kubernetes 集群 - Get https://api.[mycluster]/api?timeout=32s: x509: certificate signed by unknown authority, Kubernetes cluster created on AWS using kops and Travis-CI 无法通过AWS身份验证连接到Docker容器中的Hashicorp Vault-X509证书错误 - Can't connect to Hashicorp Vault in Docker container with AWS authentication- x509 certificate error IdentityServer4 在 AWS 共享 X509 证书 - IdentityServer4 shared X509 certificate at AWS 如何配置基于x509客户端证书的身份验证以连接到基于AWS RDS的PostgreSQL - How to configure x509 client certificate based authentication to connect to AWS RDS based PostgreSQL AWS 教程 - 将 Docker 映像推送到 AWS ECR 错误 x509 - AWS Tutorial - Pushing Docker Image to AWS ECR error x509
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM