[英]x509: certificate is valid for *<rest-of-hostname>, not <bucket/hostname>
I am trying to upload a file to Amazon S3 bucket with Go SDK to a custom endpoint, but I am obtaining that error:我正在尝试使用 Go SDK 将文件上传到 Amazon S3 存储桶到自定义终端节点,但我收到了该错误:
RequestError: send request failed caused by: Put https://<bucket>.<custom-endpoint>/sample.tar.gz: x509: certificate is valid for *<hostname>, not <bucket/hostname>
The certificate of the custom endpoint contains a wildcard at the beginning of the Common Name (*.), where I should infer that the wildcard would cover the request it is trying to perform.自定义端点的证书在通用名称 (*.) 的开头包含一个通配符,我应该在此推断通配符将涵盖它尝试执行的请求。
I have tried to upload the file with Python3 and boto3 package, obtaining a successfull result.我尝试使用 Python3 和 boto3 package 上传文件,获得了成功的结果。
Can you please advise about this?你能就此提出建议吗?
You could simply put the word "bucket" in front of the vpc endpoint.您可以简单地将“bucket”一词放在 vpc 端点的前面。 So, if your endpoint is:因此,如果您的端点是:
*.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com *.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com
in your config (for the EndpointResolver) you should use:在您的配置中(对于 EndpointResolver),您应该使用:
https://bucket.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com https://bucket.vpce-09f99bc99983c51-188851c5.s3.us-east-1.vpce.amazonaws.com
Don't forget to to set URL, SigningRegion and Source when returning the EndpointResolverFunc返回 EndpointResolverFunc 时不要忘记设置 URL、SigningRegion 和 Source
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.